Skip to content

[Feature request] A way to copy a directory with metadata (and/or recursively) #160

Open
@navid-zamani

Description

There is no equivalent to the popular cp -a available.
It is similar to copyFileWithMetadata, but for entire directories. It is also very strict about including all metadata (even xargs).

cp -a works recursively, and I’d argue that that’s the main case where copying the metadata makes sense, but maybe the option to only copy the directory metadata and not the files in there should be left open.

So maybe a generic copyMetadata that works on files, directories, symlinks, and everything else, because it only alters the metadata, which is only stored in the parent directory, and accessible via stat and xattr.

copyPathRecursivelyWithMetadata (or archivePath?) could then be implemented on top of that.

Is that a good thing to add?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions