|
I think the overwrite without trunc that you are doing should be OK. Of course there is no guarentee that the OS hasn't already moved the file around previously (e.g. during a defrag), so there may be copies of the data all over the disk.
You probably don't need "fin" at all anymore, you can just use the return value of stat to check if the file exists.
I'd probably do a * every 1% of the file size, otherwise if you wipe out a 2GB file you are going to be seeing asterisks in your sleep for a week.
|