EldoS | Feel safer!

Software components for data protection, secure storage and transfer

use of NotifyDirectoryChange()

Posted: 07/08/2015 15:32:01
by Eugene Mayevski (Team)

In step 3 the call of CbFsGetFileInfo() is either a coincidence or it comes for a different file or there was some trigger that made the OS (CBFS doesn't call any file-related callbacks at its own discretion -- all file-related requests are initiated by the OS) request file size. Thus it is not guaranteed that this callback would be called. You should not rely on it.

You must call NotifyDirectoryChange after step 2. How you get to know that the file was changed via the physical path is up to you (I described some options in my previous messages).

If you call NotifyDirectoryChange, everything should work smoothly (unless there's some issue in the MetadataCache in CBFS, but you can turn off that cache for your tests).

If you don't call NotifyDirectoryChange, then you should not make any assumptions in regards to OS behavior and requests to CbFsGetFileInfo().

In any case, calling NotifyDirectoryChange from CbFsGetFileInfo() won't work for several reasons I already mentioned above and you can pass by this "solution".

Sincerely yours
Eugene Mayevski



Topic viewed 10483 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!