EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnGetFileInfo and OnEnumerateDirectory with mask

#25868
Posted: 07/29/2013 09:39:38
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 70

To obtain file information the OS sometimes calls
Code
GetFileInfo(filename = '\path\filename.ext')
and sometimes
Code
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) ?
#25872
Posted: 07/30/2013 01:27:09
by Volodymyr Zinin (Team)

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.

Reply

Statistics

Topic viewed 1061 times

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




|

Back to top

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

Got it!