-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Description
Feature or enhancement
Proposal:
When copying a tree of files, it is sometimes useful for them to have default stat() information (file permissions, mtime and so on), instead of it being copied from the source files, for example when copying files from a read-only location to a temporary location where they may be modified or deleted later, but shutil.copytree unconditionally copies stat() information.
In a script that I wrote, I worked around the lack of this feature by monkey-patching the shutil.copystat function to do nothing, but this is clearly not a robust approach.
Ideally I would like to be able to turn off the stat() copying behavior by passing a named argument to copytree, such as:
shutil.copytree(src, dst, copystat=False)
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response