4 ms·
You can FindFirstFile (not that, but directly reading the directory as a file) really fast (haven't measured that recently), but there is latency
by malkia 6y ago
You can FindFirstFile (not that, but directly reading the directory as a file) really fast (haven't measured that recently), but there is latency
- acqq 6y ago> FindFirstFile (not that, but directly reading the directory as a file) I always believed FindFirstFile actually does read the directory as a file once (or in some convenient chunks), keeps the handle to that and returns an element of that each time FindNextFile is called. Moreover, NTFS has some stat-like file information in the directory file, exactly to be able to return it this way. And as always, then the problem with having the cached information is, what if it is stale. But sometimes, for some purposes, it can be good enough.