You are not logged in.
https://www.wholetomato.com/blog/2024/1 … n-windows/
Not super easy to adapt in own code, and 50x promice is only for c++ side.
But might be nice to check those Windows API:s own code libraries.
-Tee-
Offline
The mormot.core.os.windows.inc file already includes the fastest method, i.e. GetFileAttributesEx.
With no memory allocation needed if TFileName is not an UnicodeString (e.g. on FPC or old Delphi).
It also can automatically switch to extended path names for lengths > 260 chars.
And with other specific functions to retrieve all needed information like size or timestamp in a single syscall.
Offline
The mormot.core.os.windows.inc file already includes the fastest method, i.e. GetFileAttributesEx
But, the article says that the FindFirstFileEx is the fastest one.
Offline
I experimented the contrary when you want to know one file information.
This benchmark is very misleading: it is about reading the information about files in a folder.
Of course, for this FIndFirstFileEx() is the fastest.
It even compares apples and oranges, because their FindFirstFileEx() does not even make any usages of the input "files" array parameter.
Very doubtful and misleading information.
Offline