Function deleteDirZ [src]
Same as deleteDir except the parameter is null-terminated.
Prototype
pub fn deleteDirZ(self: Dir, sub_path_c: [*:0]const u8) DeleteDirError!void
Parameters
self: Dir
sub_path_c: [*:0]const u8
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 deleteDirZ(self: Dir, sub_path_c: [*:0]const u8) DeleteDirError!void {
posix.unlinkatZ(self.fd, sub_path_c, posix.AT.REMOVEDIR) catch |err| switch (err) {
error.IsDir => unreachable, // not possible since we pass AT.REMOVEDIR
else => |e| return e,
};
}