Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

FileInfo.Delete method appears to run in background

$
0
0

My app is set up to delete output file before regenerating them.  It appears that the delete operation is running on a basckground thread.  I am not certain what is happening but here is what I do know.

If the process to create the data to be written out runs quicker than normal, the file creation timestamp remains unchanged.
If I add a 1 second delay after deleting the file, the file creation timstamp is always the current time.

My users rely on the file creation timestamp to locate the latest changes.

Any ideas on how to change this behavior without adding a call to sleep()?


Mac


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>