[Python-ideas] Implementation of shutil.move
Masklinn
masklinn at masklinn.net
Mon Aug 15 22:10:56 CEST 2011
On 2011-08-15, at 19:24 , Guido van Rossum wrote:
>
> Doing a move or rename atomically with the provision that it fails
> reliably when the target exists might be useful in some cases, but it
> seems to be more related to filesystem-based locking, which is known
> to be hard in a cross-platform way. (It also seems that some folks on
> the thread have ignored Windows in their use of the term
> "cross-platform".)
According to the documentation for `os.rename`, it already fails on
windows if the target exists (though I do not know if it also fails
on e.g. NFS or across filesystems), which seems to be the behavior
desired for "move2".
So there is no real reason to discuss it, unless there are tricky
edge cases in its behavior.
More information about the Python-ideas
mailing list