diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-02-19 10:55:19 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-02-19 10:55:19 (GMT) |
commit | 382abeff0f1a53ffaaddfea06e8721bf42b66502 (patch) | |
tree | b59671b10eefc9082b426aa1d5c4304e26fbb9db /Lib/shutil.py | |
parent | 0713a68dc55f355df8fa0ecd6fd4ccb9c03b7e7c (diff) | |
download | cpython-382abeff0f1a53ffaaddfea06e8721bf42b66502.zip cpython-382abeff0f1a53ffaaddfea06e8721bf42b66502.tar.gz cpython-382abeff0f1a53ffaaddfea06e8721bf42b66502.tar.bz2 |
Patch #1490190: posixmodule now includes os.chflags() and os.lchflags()
functions on platforms where the underlying system calls are available.
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index c3ff687..f00f9b7 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -60,13 +60,15 @@ def copymode(src, dst): os.chmod(dst, mode) def copystat(src, dst): - """Copy all stat info (mode bits, atime and mtime) from src to dst""" + """Copy all stat info (mode bits, atime, mtime, flags) from src to dst""" st = os.stat(src) mode = stat.S_IMODE(st.st_mode) if hasattr(os, 'utime'): os.utime(dst, (st.st_atime, st.st_mtime)) if hasattr(os, 'chmod'): os.chmod(dst, mode) + if hasattr(os, 'chflags') and hasattr(st, 'st_flags'): + os.chflags(dst, st.st_flags) def copy(src, dst): |