EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnGetFileInfo and OnEnumerateDirectory with mask

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
Posted: 07/29/2013 09:39:38
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 64

To obtain file information the OS sometimes calls
GetFileInfo(filename = '\path\filename.ext')
and sometimes
EnumerateDirectory(filename = '\path', mask = 'filename.ext')
is called (the mask doesn't contain any wildcards).

Should there be any difference in handling these requests (aside from returning ERROR_FILE_NOT_FOUND vs FileFound=false) ?
Posted: 07/30/2013 01:27:09
by Volodymyr Zinin (EldoS Corp.)

No. There isn't any difference. The reason why sometime EnumerateDirectory with exact file name is used is in the logic of programs that request information about the file. For example they either can use the win32 GetFileAttributes or FindFirstFile APIs. It seems in the first case the GetFileInfo callback is called, but in the second case it causes to call the EnumerateDirectory callback.



Topic viewed 930 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!