You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 24, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 24, 2026. It is now read-only.
Implement a recursive copy command in Node.js. I have been drafting a proposal for this functionality in this document: https://hackmd.io/Q2O7hVyZSKClYW9Vyipeig
At this stage I'd like feedback from the Tooling group on the proposal. Once we're happy with it we can open an issue in the main Node.js repo to get broader feedback. If all goes well we can follow up with an implementation.
@RyanZim We're considering using the fs-extra recursive copy implementation in Node.js. I'd love your feedback on this proposal and on incorporating part of fs-extra into Node core. cc @CxRes
@manidlou is the collaborator that handles most things related to copy and move in fs-extra; so looping him in here since his feedback is probably most useful here.
Would you be planning on implementing the filter option as well?
I am not involved with fs-extra though I use it in my work. And, I find the copy function incredibly useful.
However, from the point of view of nodejs, I think the copy function as implemented in fs-extra is limited. Don't get me wrong, it is really good for day to day use, its just that recursive copy is a relatively complex operation.
I would suggest that you consider cp, rsync and Windows Robocopy for inspiration.
A few things, I would like are:
A verbose output as a return value
A filter that can take regex and/or glob array (most times I end up importing picomatch)
@iansu I just want to remind you that our copy implementation in fs-extra is a bit different than unix cp command.
For instance, in fs-extra, when copying a file to a different directory, like copy('src-file.js', 'some/dir/dest-file.js') the user requires to explicitly specify the destination file name meaning copy('src-file.js', 'some/dir/') would fail in fs-extra while it works fine in the unix cp command.
That was a source of confusion for some of our users because they have this assumption that fs-extra functions would work like unix commands (which is a fair assumption since node is very unix-y) but we at fs-extra decided to go with explicitness.
So probably something that you might want to consider when deciding on the behavior of the function.
Implement a recursive copy command in Node.js. I have been drafting a proposal for this functionality in this document: https://hackmd.io/Q2O7hVyZSKClYW9Vyipeig
At this stage I'd like feedback from the Tooling group on the proposal. Once we're happy with it we can open an issue in the main Node.js repo to get broader feedback. If all goes well we can follow up with an implementation.