Closed hyf0 closed 5 months ago
I think you're misunderstanding the docs. copy
will recurse directories, the point is that it does not copy the top-level directory itself, so you can specify an existing directory with contents as a destination, and it will copy everything in the source directory to the destination without overwriting the existing destination contents (assuming there's no conflicting files).
Yeah. I got it wrong. Thanks for explaining.
I just look into the code.
https://github.com/jprichardson/node-fs-extra/blob/d96f2655f181f1c6b1641711619400140a89d027/lib/copy/copy.js#L129-L131
Now
copy
will copy directory recursively instead not doing it like the document said inhttps://github.com/jprichardson/node-fs-extra/blob/d96f2655f181f1c6b1641711619400140a89d027/docs/copy-sync.md?plain=1#L5
The document of
@types/fs-extea@11.0.4
is also wrong.