EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Handling of openFile parameters

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#13615
Posted: 06/08/2010 04:57:33
by Thomas Mäder (Standard support level)
Joined: 05/26/2010
Posts: 11

When you get an CbFsOpenFileEvent, you get the parameters "DesiredAccess" and "ShareMode" (CbFS V 3.0). Does a client have to implement the checking of these parameters?
For example, do I have to check that the "ShareMode" is compabible with all previous open events? Do I have to check that a file is indeed writeable if that is the case, or does CbFS check the file attributes first?
#13617
Posted: 06/08/2010 06:17:52
by Eugene Mayevski (EldoS Corp.)

As file attributes have nothing to do with actual possibility to write, the driver checks only existence of the file (in order to decide if it needs to fire OnCreate or OnOpen event). All other checks should be performed by you. This allows maximum flexibility.


Sincerely yours
Eugene Mayevski
#13618
Posted: 06/08/2010 07:09:20
by Thomas Mäder (Standard support level)
Joined: 05/26/2010
Posts: 11

Same thing for the ShareMode parameter, I guess? Unfortunately, I find the MSDN documentation of the intended behaviour very confusing.
#13620
Posted: 06/08/2010 08:37:53
by Volodymyr Zinin (EldoS Corp.)

Both parameters DesiredAccess and ShareMode are processed internally by CallbackFS. For example if someone opens a file located on a CallbackFS disk for exclusive access (neither FILE_SHARE_READ nor FILE_SHARE_WRITE are specified) then no one else can open the file with read-write access. In this case the OnOpen callback isn't called for the second opening because CallbackFS processes such conflict itself.
#13621
Posted: 06/08/2010 09:24:45
by Thomas Mäder (Standard support level)
Joined: 05/26/2010
Posts: 11

Thank you, that answers my question.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

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