seung-lab / cloud-files

Threaded Python and CLI client library for AWS S3, Google Cloud Storage (GCS), in-memory, and the local filesystem.
BSD 3-Clause "New" or "Revised" License
38 stars 8 forks source link

`cp -r` semantics #52

Closed william-silversmith closed 3 years ago

william-silversmith commented 3 years ago

Currently, cloudfiles cp -r differs from cp -r because unlike with a regular filesystem, object storage doesn't have a convenient mv command. So where cp -r copies the directory and the subfiles, cloudfiles cp -r copies only the subfiles to allow you to specify the level of hierarchy in the destination path.

However, this has caused confusion for several users. Perhaps we could allow cp -r to follow POSIX semantics while allowing cp dir/** to work like before.

nkemnitz commented 3 years ago

Maybe for comparison, gsutil: https://cloud.google.com/storage/docs/gsutil/commands/cp#how-names-are-constructed - I think that's what lab members are probably already familiar with.

aws s3 cp also has a useful --dryrun argument