You could probably use hard links for this. Before deleting the file, create hard links to them from a temporary directory, then delete the originals. The files will continue to exist because of the hard link, but will no longer be accessible at their original location. Once all your database work is done you can just delete the temporary directory and all scheduled files will be gone, or link them back to the original place if the DB transaction failed.
In reply to Re: Atomic use of unlink() and SQL DELETE? How?
by tirwhan
in thread Atomic use of unlink() and SQL DELETE? How?
by robins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |