RE: [PHP] File Locking during *other* file operations

2004-12-23 Thread Robinson, Matthew
lock fails. I think that locks fail for a reason and you should find that reason before you unlock and potentially break something. M -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: 20 December 2004 18:26 To: Robinson, Matthew Cc: Michael Sims; php-general Subject:

RE: [PHP] File Locking during *other* file operations

2004-12-20 Thread Richard Lynch
Robinson, Matthew wrote: > I use this code, Not all my own, some from the php manual (probably > most of it in fact) I lock the file as filename.lock so that I can muck > about with it completely and then unlock the .lock and remove it. > > M > > function LockFile($file) > { > > $LockFile

RE: [PHP] File Locking during *other* file operations

2004-12-20 Thread Robinson, Matthew
-Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED] Sent: 17 December 2004 15:28 To: php-general Subject: RE: [PHP] File Locking during *other* file operations Gerard Samuel wrote: > Im talking about file locking during deleting, and moving files. > Is it possible to perfo

Re: [PHP] File Locking during *other* file operations

2004-12-17 Thread Gerard Samuel
Michael Sims wrote: Yes, have your scripts attempt to lock a separate lock file before performing deleting or moving operations. Jason Barnett wrote: Sure... just acquire the exclusive lock like you would for writing to a file, but do the delete / move instead. Your apps must actually try to

RE: [PHP] File Locking during *other* file operations

2004-12-17 Thread Michael Sims
Gerard Samuel wrote: > Im talking about file locking during deleting, and moving > files. > Is it possible to perform file locking for these file operations? Yes, have your scripts attempt to lock a separate lock file before performing deleting or moving operations. -- PHP General Mailing List (