FindFirstFile function kernel32
Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used).
To learn more, see learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-findfirstfilew.
Implementation
Win32Result<HANDLE> FindFirstFile(
PCWSTR lpFileName,
Pointer<WIN32_FIND_DATA> lpFindFileData,
) {
resolveGetLastError();
final result_ = _FindFirstFile(lpFileName, lpFindFileData);
return .new(value: .new(result_), error: GetLastError());
}