accessW
Call from Windows-specific code if you already have a WTF-16LE encoded, null terminated string.
Otherwise use access or accessZ.
Function parameters
Parameters
- path:[*:0]const u16
Type definitions in this namespace
Types
Call from Windows-specific code if you already have a WTF-16LE encoded, null terminated string.
Functions
- accessW
- Call from Windows-specific code if you already have a WTF-16LE encoded, null terminated string.
- getFdPath
- Return canonical path of handle `fd`.
- fstatat_wasi
- WASI-only.
See also `getenv`.
Values
Source
Implementation
pub fn accessW(path: [*:0]const u16) windows.GetFileAttributesError!void {
const ret = try windows.GetFileAttributesW(path);
if (ret != windows.INVALID_FILE_ATTRIBUTES) {
return;
}
switch (windows.GetLastError()) {
.FILE_NOT_FOUND => return error.FileNotFound,
.PATH_NOT_FOUND => return error.FileNotFound,
.ACCESS_DENIED => return error.AccessDenied,
else => |err| return windows.unexpectedError(err),
}
}