> "Rory O'Connor" <[EMAIL PROTECTED]> said:

> I am using File::Copy to move a file from one directory to another.  However, I do 
>not want to move the file if it is being written to (by another program).  
> 
> Do i need to lock the file before moving it or does File::Copy by nature wait until 
>a file is not being written to before moving?  
> 
> I looked into flock, but I am not sure that isn't just for opening and writing to 
>files.

The flock model is advisory.  That is all the readers and writers must agree 
to use the locking protocol. If a reader or writer choses not to, you will not 
know it which could result in file corruption.

-- 
Smoot Carl-Mitchell
Consultant



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to