EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Mounter DeletePoint Clarification

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#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 (EldoS Corp.)

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 (EldoS Corp.)

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 (EldoS Corp.)

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 (EldoS Corp.)

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 (EldoS Corp.)

It's not necessary, right.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

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