EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Get file when remote

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#15745
Posted: 02/14/2011 08:30:13
by jonathan weizman (Basic support level)
Joined: 02/07/2011
Posts: 6

After playing more, i get a better understanding...
But one thing is not clear to me :
-i'm not sure about the border between my application and CallBack File system.
I thought i was responsible to provide all the data when the callback is called but in your sample i see :
DirectoryInfo newDir = new DirectoryInfo(edtMountinPoint.Text + @"\Sample\");
newDir.Create();
using (StreamWriter sw = new StreamWriter(edtMountinPoint.Text + @"\Sample\TestFile_1.txt"))
{
sw.Write("This is the ");
sw.WriteLine("header for the file.");
sw.WriteLine("-------------------");
sw.Write("The date is: ");
sw.WriteLine(DateTime.Now);
}

meaning that you write to the system the virtual file...
I wish i could bring it only when i need it...
To be precise my question is : what the knowlegde of the CallBackFile system of my file structure ?
#15746
Posted: 02/14/2011 09:04:51
by Eugene Mayevski (EldoS Corp.)

The sample demonstrates how virtual files are created.

The OS learns your file structure by calling OnEnumerateDirectory callback. Consequently, your file structure needs to be persistent between enumerations of the same directory. If your backend data have changed, you need to call CallbackFileSystem.NotifyDirectoryChange method to tell the OS, that your file system needs rescanning.

Please do the search in this forum for NotifyDirectoryChange. This method has been discussed here many times.


Sincerely yours
Eugene Mayevski

Reply

Statistics

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