Function GetFileAttributesW [src]

Prototype

pub fn GetFileAttributesW(lpFileName: [*:0]const u16) GetFileAttributesError!DWORD

Parameters

lpFileName: [*:0]const u16

Possible Errors

AccessDenied
FileNotFound
Unexpected

Source

pub fn GetFileAttributesW(lpFileName: [*:0]const u16) GetFileAttributesError!DWORD { const rc = kernel32.GetFileAttributesW(lpFileName); if (rc == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { .FILE_NOT_FOUND => return error.FileNotFound, .PATH_NOT_FOUND => return error.FileNotFound, .ACCESS_DENIED => return error.AccessDenied, else => |err| return unexpectedError(err), } } return rc; }