Skip to content

fs.cp() should support copy-on-write operation if the underlying platform supports it #47080

Description

@tetsuharuohzeki

What is the problem this feature will solve?

fs.copyFile() supports copy-on-write operation if the underlying platform supports it by passing a mode flag. This behavior was added in a16d88d.

However, fs.cp(), fs.cpSync(), and fsPromises.cp() does not support its behavior and there are not any flag to change to it.

What is the feature you are proposing to solve the problem?

fs.cp(), fs.cpSync(), and fsPromises.cp() should have a way to enable copy-on-write behavior if the platform supports it.

What alternatives have you considered?

I had opened the #47074 once but it was withdrawn by that it should sort with the behavior of fs.copyFile() as opt-in behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions