Function deleteTreeMinStackSize [src]

Like deleteTree, but only keeps one Iterator active at a time to minimize the function's stack size. This is slower than deleteTree but uses less stack space. On Windows, sub_path should be encoded as WTF-8. On WASI, sub_path should be encoded as valid UTF-8. On other platforms, sub_path is an opaque sequence of bytes with no particular encoding.

Prototype

pub fn deleteTreeMinStackSize(self: Dir, sub_path: []const u8) DeleteTreeError!void

Parameters

self: Dirsub_path: []const u8

Possible Errors

AccessDenied
BadPathName

On Windows, file paths cannot contain these characters: '/', '*', '?', '"', '<', '>', '|'

DeviceBusy
FileBusy
FileSystem
FileTooBig
InvalidUtf8

WASI-only; file paths must be valid UTF-8.

InvalidWtf8

Windows-only; file paths provided by the user must be valid WTF-8. https://simonsapin.github.io/wtf-8/

NameTooLong
NetworkNotFound

On Windows, \\server or \\server\share was not found.

NoDevice
NotDir

One of the path components was not a directory. This error is unreachable if sub_path does not contain a path separator.

PermissionDenied
ProcessFdQuotaExceeded
ReadOnlyFileSystem
SymLinkLoop
SystemFdQuotaExceeded
SystemResources
Unexpected UnexpectedError

The Operating System returned an undocumented error code.

This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.

When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.

Source

pub fn deleteTreeMinStackSize(self: Dir, sub_path: []const u8) DeleteTreeError!void { return self.deleteTreeMinStackSizeWithKindHint(sub_path, .file); }