[issue10016] shutil.copyfile -- allow sparse copying
Tom Potts added the comment: @pitrou Hmm... the online docs and the contents of the doc directory on the trunk branch say differently: """ Resize the stream to the given *size* in bytes (or the current position if *size* is not specified). The current stream position isn't changed. This resizing can extend or reduce the current file size. In case of extension, the contents of the new file area depend on the platform (on most systems, additional bytes are zero-filled, on Windows they're undetermined). The new file size is returned. """ Unless you know something else about this, I'm going to assume it's still okay to use. @r.david.murray Thanks for your comments -- I'm trying to put together some unit tests and documentation, against the Subversion trunk. Tom -- ___ Python tracker <http://bugs.python.org/issue10016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
Changes by Tom Potts : Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch ___ Python tracker <http://bugs.python.org/issue10016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
Tom Potts added the comment: (see opening message) -- Added file: http://bugs.python.org/file19108/shutil-2.7.patch ___ Python tracker <http://bugs.python.org/issue10016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
New submission from Tom Potts : Copying a sparse file under Linux using shutil.copyfile will not result in a sparse file at the end of the process. I'm submitting a patch that will remedy this. Note that I am only concerned with Linux at the moment -- as far as I know this patch will not mess things up on other platforms, but this will need to be tested. It depends on the behaviour of os.truncate() when the pointer is past the end of the file, which according to the docs is platform dependant. Tom P.S. This is my first time submitting an issue -- if there's anything I need to do and haven't, please let me know. -- components: Library (Lib) files: shutil-2.6.patch keywords: patch messages: 117878 nosy: karaken12 priority: normal severity: normal status: open title: shutil.copyfile -- allow sparse copying type: feature request versions: Python 2.6, Python 2.7, Python 3.2 Added file: http://bugs.python.org/file19107/shutil-2.6.patch ___ Python tracker <http://bugs.python.org/issue10016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com