EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Mounter DeletePoint Clarification

#19279
Posted: 03/03/2012 16:10:17
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

Why does the DeletePoint method delete actual files prior to deleteing the mount point? Is this simply to demonstrate how to delete files OR is this a binary requirement somewhere? What would happen if the files were NOT deleted?

Thanks, in advance,
Fred Lackey
#19280
Posted: 03/03/2012 16:25:31
by Eugene Mayevski (Team)

We have a slight confusion with file names. All samples have the name "Mounter". So please clarify in what folder the sample you are refering to is located?


Sincerely yours
Eugene Mayevski
#19281
Posted: 03/03/2012 16:54:33
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

C:\Program Files\EldoS\Callback File System\Samples\dotNET\C#\VMounter
#19283
Posted: 03/04/2012 01:31:41
by Eugene Mayevski (Team)

VMounter and VDisk are virtual drives, which store files in memory. Consequently they have nowhere to flush files on shutdown.


Sincerely yours
Eugene Mayevski
#19285
Posted: 03/04/2012 05:54:40
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

But why delete the individual files? If the files are being written to memory would they not be lost once the drive was dismounted?
#19287
Posted: 03/04/2012 07:28:50
by Eugene Mayevski (Team)

Please explain what exactly you mean by "delete files". Is OnDeleteFile callback called or ... ?


Sincerely yours
Eugene Mayevski
#19290
Posted: 03/04/2012 08:03:15
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

In the DeletePoint example method you recurse through the mount points and directories WITHIN each mount point. For each FileInfo object in the directory you then call Delete(). This puzzles me why you would do so much more work if the files are in RAM. They will be gone the moment you unmount the drive. No?

Code
DirectoryInfo dirinfo = new DirectoryInfo(mountPoint);
FileInfo[] finfo = dirinfo.GetFiles();

foreach (FileInfo fi in finfo)
{
   fi.Delete();
}
#19292
Posted: 03/04/2012 08:23:57
by Eugene Mayevski (Team)

Who knows ... Probably it is just a demonstration of cleanup of the storage.


Sincerely yours
Eugene Mayevski
#19293
Posted: 03/04/2012 08:48:01
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

But, to confirm, this isn't necessary. Correct?
#19294
Posted: 03/04/2012 09:07:02
by Eugene Mayevski (Team)

It's not necessary, right.


Sincerely yours
Eugene Mayevski

Reply

Statistics

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