Giampaolo Rodola' <g.rod...@gmail.com> added the comment:

If we use CopyFileExW in copy2(), then also copystat() and copymode() should be 
able to copy the same metadata/security-bits/etc as CopyFileExW. I don't know 
which Windows APIs should be used though.

I sort of agree with Steven that CopyFileExW could be used everywhere (meaning 
copyfile()), but that basically means breaking backward compatibility re. what 
is promised in the doc, and am not sure how to deal with that. For that reason 
it's probably it's better to leave copyfile() alone. 

On macOS it seems we can use fcopyfile(3) syscall (which is already exposed) 
and its flag argument (COPYFILE_METADATA, COPYFILE_DATA. COPYFILE_XATTR, etc,) 
to implement both copy2() and copystat() / copymode().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38906>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to