PyDocs

Nav

File and Directory Access

copystat

shutil

function (source)
  • copystat(src, dst, *, follow_symlinks=True)
Copy file metadata

Copy the permission bits, last access time, last modification time, and
flags from `src` to `dst`. On Linux, copystat() also copies the "extended
attributes" where possible. The file contents, owner, and group are
unaffected. `src` and `dst` are path-like objects or path names given as
strings.

If the optional flag `follow_symlinks` is not set, symlinks aren't
followed if and only if both `src` and `dst` are symlinks.
Changed in 3.3
  • 3.3: Added follow_symlinks argument and support for Linux extended attributes.
0 Examples
No examples for shutil/copystat.
See Also
No see-alsos for shutil/copystat
0 Notes
No notes for copystat