This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ysj.ray
Recipients ysj.ray
Date 2010-04-14.04:29:21
SpamBayes Score 5.551115e-17
Marked as misclassified No
Message-id <1271219368.33.0.150416464623.issue8395@psf.upfronthosting.co.za>
In-reply-to
Content
The shutil.copytree() function copies the whole tree recursively, and copy one single regular file with copy2(). I hope it can be more powerful(), that is, allow specifying a customerized copy function, rather than copy2(). To be specific, add an optional keyword argument, named "copy_func" or something like, default to copy2.

It will be useful for doing some customerized filesystem tree copying.

For example, when writing something like the project install script, or update script, which need to ignore some file while copying the whole directory, or changing ".ini" file after copying, or rename the file name after copying. All the specific copy action can be done in our customerized copy function instead of copy2().

Is there anybody who has the same feature request? Or is there some other module already provides the same functionality?

If so, I can provide a patch for it.

Thanks!
History
Date User Action Args
2010-04-14 04:29:29ysj.raysetrecipients: + ysj.ray
2010-04-14 04:29:28ysj.raysetmessageid: <1271219368.33.0.150416464623.issue8395@psf.upfronthosting.co.za>
2010-04-14 04:29:25ysj.raylinkissue8395 messages
2010-04-14 04:29:21ysj.raycreate