[Python-ideas] Implementation of shutil.move

Christian Heimes lists at cheimes.de
Sun Aug 14 16:00:50 CEST 2011


Am 14.08.2011 08:01, schrieb David Townshend:
> The latest idea (which I've now described on the issue tracker), is not to
> use os.open(), rather os.link() and os.unlink(), which should work the same
> across platforms.  Please could someone correct me if I'm wrong about this.

My proposed link() / unlink() procedure works only on platforms and file
systems, that support hard links. I totally forgot about the file system
issue, sorry. :)

Hard links won't work on a FAT32 mount point on Unix and probably not on
Samba shares, too. It might work on NTFS if the VFS implements it but
NTFS has a limited reference counter for hard links. It might be
possible that a rename() op would work but a link() op wouldn't.

Christian




More information about the Python-ideas mailing list