Closed
Description
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.