Function deleteDirW [src]

Same as deleteDir except the parameter is WTF16LE, NT prefixed. This function is Windows-only.

Prototype

pub fn deleteDirW(self: Dir, sub_path_w: []const u16) DeleteDirError!void

Parameters

self: Dirsub_path_w: []const u16

Possible Errors

AccessDenied
BadPathName
DirNotEmpty
FileBusy
FileNotFound
FileSystem
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.

NotDir
PermissionDenied
ReadOnlyFileSystem
SymLinkLoop
SystemResources
Unexpected

Source

pub fn deleteDirW(self: Dir, sub_path_w: []const u16) DeleteDirError!void { posix.unlinkatW(self.fd, sub_path_w, posix.AT.REMOVEDIR) catch |err| switch (err) { error.IsDir => unreachable, // not possible since we pass AT.REMOVEDIR else => |e| return e, }; }