EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CBFS Events - when I know for sure that the file is ready

Posted: 11/19/2014 06:59:46
by Dovi A (Basic support level)
Joined: 11/19/2014
Posts: 2

I'm using Windows 7, and use CBFS with C# (I ran the example Mapper_VS2012).

There are some callbacks which apply during copying file (into the mounted drive), such as CbFsOpenFile, CbFsWriteFileNative, etc.
Is there any callback which tells me that now the file is ready?
Maybe CbFsCloseFile with some flags inside the parameters somehow?

I'm asking that since I would like to use the file right after it ready on the mounted drive.

Posted: 11/19/2014 07:45:48
by Volodymyr Zinin (Team)

What do you mean by "file is ready"? Do you want to know whether a file is completely closed?

Posted: 11/19/2014 08:59:48
by Dovi A (Basic support level)
Joined: 11/19/2014
Posts: 2

I would like to know when the copy operation is ended, and know the mounted drive has the file ready (equals exactly to the source file - all bytes exist).
Posted: 11/19/2014 10:39:55
by Volodymyr Zinin (Team)

The OnClose callback is always the last which is called for a file. After it the file is completely closed. The problem here is that copy algorithms that applications use can be different. Actually in the case of "simple" file copying it seems the copy algorithm should be the following:
1. Application creates a destination file (CBFS calls the OnCreate callback).
2. Several sequential writes are performed (the OnWrite callback is called one or more times).
3. The application closes the file (the OnClose callback is called).



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