shutil.copy() and shutil.copystat()
The source code to those two functions are here:
copystat works by reading the permission bits, access times, and flags
from the source file and applying them to the destination file.
copy works by copying the content of the file, then copying the file
Both functions are quite complex because they have to deal with
differences between platforms. Some operating systems provide more
capabities than others.
thanks for contributing!