fs package question - cp -p semantics when copying files?

Paul Moore p.f.moore at gmail.com
Wed Apr 3 10:56:47 EDT 2019

On Wed, 3 Apr 2019 at 14:55, Skip Montanaro <skip.montanaro at gmail.com> wrote:
> It's part of a larger application which needs to copy files from a number
> of locations, not all of which are filesystems on local or remote hosts
> (think zip archives, s3 buckets, tar files, etc). In that application, I am
> using the fs package (PyFilesystem). Since it collects files from a number
> of locations (some static, some updated monthly, some daily), it would be
> handy if I could preserve file timestamps for post mortem debugging.

>From a brief look at the docs, there's an on_copy callback to copy_fs.
Maybe you could use the getinfo/setinfo methods to copy over the
timestamps and any other file metadata that you want in that callback?


More information about the Python-list mailing list