in reply to How to detect if file is in use?
What I did in the past was renaming the file.
If you can rename it, it is not in use.
Particularly, when a process might reopen the file and append something, you have the advantage of having your file to work with and the process starts to write a new file.
Update:
Gellyfish is right, I did it only with MS/IBM/DEC-(nonUNIX) Systems.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to detect if file is in use?
by gellyfish (Monsignor) on Mar 17, 2005 at 12:32 UTC | |
Re^2: How to detect if file is in use?
by bart (Canon) on Mar 17, 2005 at 13:57 UTC |
In Section
Seekers of Perl Wisdom