Hyssar Posted April 22, 2007 Share Posted April 22, 2007 Thanks for helping me. My question is : Is there any way for a process to know if a file is locked with flock by an other process? And : If a process requests a file that is locked, what's happening? It waits until the other one finished writing? or it ends and resolves to false? How can I verify that a file is "free" before using it in PHP? (I would appreciate an example of code that verifies this condition). Thanks, Hyssar Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 22, 2007 Share Posted April 22, 2007 A good start would be to read http://ca.php.net/manual/en/function.flock.php including the user notes Quote Link to comment Share on other sites More sharing options...
Hyssar Posted April 22, 2007 Author Share Posted April 22, 2007 It seems that is_readable could party solve my problem. What do you think, dear helpers? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.