EldoS | Feel safer!

Software components for data protection, secure storage and transfer

AddMountingPoint: CBFS_SYMLINK_NETWORK - Refresh view ?

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
Posted: 05/23/2014 12:47:36
by Madhan Kanagavel (Standard support level)
Joined: 05/23/2014
Posts: 4

We have an application that exposes a remote network server as a local drive using CBFS.

Currently we have set the mount point with CBFS_SYMLINK_NETWORK and it works fine.

The problem we have is that is if a user has a folder open and if the remote server has newer files in that folder, then the only way the local folder will show is when the user hits the refresh button (unlike other network drives like samba mounts.

Is there any other flag we should use for the OS to request periodic refresh of the current local folder?
Posted: 05/23/2014 13:26:03
by Eugene Mayevski (EldoS Corp.)

The OS doesn't refresh anything periodically. When you have something to tell the OS, you can do this by calling NotifyDirectoryChange() method of CallbackFileSystem class. It's up to you how to track changes on the remote location. Once you detect such changes, call NotifyDirectoryChange() and CBFS will tell the OS that the OS needs to do what's needed.

Sincerely yours
Eugene Mayevski
Posted: 05/23/2014 13:28:06
by Madhan Kanagavel (Standard support level)
Joined: 05/23/2014
Posts: 4

Got it! Thanks Eugene
Posted: 05/23/2014 15:58:44
by Madhan Kanagavel (Standard support level)
Joined: 05/23/2014
Posts: 4

Hi Eugene,
Just to confirm:

I have a folder with the drive path as \My Files and it has 3 files.

In the server, if I add or remove files to that folder, I should be calling

NotifyDirectoryChange(folder to be refreshed in view, CallbackFileSystem::CbFsNotifyFileAction::fanModified,false);

I notice that when doing that, I only see getFileInfo being called for that folder after NotifyDirectoryChange but no enumerateFolder calls follow, is it because the "access time" is not changed for the folder?
Posted: 05/23/2014 16:04:22
by Volodymyr Zinin (EldoS Corp.)

NotifyDirectoryChange must be called for all files/directories that are added/removed/modified outside CBFS. I.e. something like this:
NotifyDirectoryChange("\folder1\folder2\file.ext", CallbackFileSystem::CbFsNotifyFileAction::fanModified,false);
Posted: 05/23/2014 17:49:58
by Madhan Kanagavel (Standard support level)
Joined: 05/23/2014
Posts: 4

Got it. Thanks you Volodymyr.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.



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