Skip to content

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

Closed
@tetsuharuohzeki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions