more useful options | |
PerlMonks |
Re: File Testby Masem (Monsignor) |
on Apr 05, 2001 at 21:40 UTC ( [id://70179]=note: print w/replies, xml ) | Need Help?? |
There's no standard way to do it, and while one could use lock files, any other program outside of yourself doesn't have to respect lock files (either creating them or obeying them).
If you think the file is being written to as you work with it, you can always use stat to get the modify time of a file before and after some point in time; if it's different, you know the file's been written to. But if the other program has the file opened, but is idling and not writing anything, you won't be able to detect this.
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
In Section
Seekers of Perl Wisdom
|
|