EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Delete file events

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.
#34890
Posted: 10/26/2015 11:57:59
by Vladimir Cherniga (EldoS Corp.)

When file is marked for delete it cannot be opened. And it will be physically deleted when the last handle to this file is closed. So it does mean that delete process may be delayed in time (when someone keeps a handle to this file).
#34891
Posted: 10/26/2015 12:34:19
by Dennis  (Premium support level)
Joined: 10/20/2015
Posts: 20

Yeah, it's pretty much clear how to deal with files. But deleting directory is apparently not the same as deleting files. No OpenFile event raised with DeleteOnClose flag in create options. And both SetDispositionInformationFile (Delete: true) and CreateFile with desiredAccess = Delete I see in Process Monitor also do not guarantee the deletion would succeed...
#34892
Posted: 10/26/2015 12:40:00
by Vladimir Cherniga (EldoS Corp.)

If someone tries to delete non-emty directory, it will fail. Only empty directory can be deleted. It does mean that you must delete all file and subdirectories inside target directory, then you may safely delete it.

Reply

Statistics

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