Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: File Test

by Masem (Monsignor)
on Apr 05, 2001 at 21:40 UTC ( [id://70179]=note: print w/replies, xml ) Need Help??


in reply to File Test

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://70179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found