[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

Giampaolo Rodola' report at bugs.python.org
Tue Jun 12 06:09:43 EDT 2018


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

This could be achieved at least on Windows with CopyFileEx [1] and on OSX with copyfile(3) + COPYFILE_ALL which copies ACLs (but not users/groups). These are (were, in case of CopyFileEx) exposed in https://github.com/python/cpython/pull/7160/. Such a new functionality would probably deserve a separate copy3() function but it would serve OSX and Windows only. I'm not sure how things would work on other POSIX platforms. 

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363852(v=vs.85).aspx
[2] http://www.manpagez.com/man/3/copyfile/

----------
nosy: +giampaolo.rodola

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30044>
_______________________________________


More information about the Python-bugs-list mailing list