Steven D'Aprano wrote:
I'm trying to safely rename a file without over-writing any existing files, and I've run into a problem with file locks. Here's a naive way of renaming without over-writing
By default on a Linux filesystem, flock() gives you an _advisory_ lock. Other processes can touch the file unless they explicitly check the lock.

Try

 man mount  (see under the -o mand)

and

 man fcntl (see under file locking)

Jeffrey Straszheim

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to