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: Dir
sub_path_w: []const u16
Possible Errors
WASI-only; file paths must be valid UTF-8.
Windows-only; file paths provided by the user must be valid WTF-8. https://simonsapin.github.io/wtf-8/
On Windows, \\server
or \\server\share
was not found.
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,
};
}