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 Link to comment https://forums.phpfreaks.com/topic/48076-few-easy-questions/ 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 Link to comment https://forums.phpfreaks.com/topic/48076-few-easy-questions/#findComment-234962 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? Link to comment https://forums.phpfreaks.com/topic/48076-few-easy-questions/#findComment-234964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.