jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.43k stars 775 forks source link

Refactor `copy` to use `opendir` #1028

Closed SukkaW closed 6 months ago

SukkaW commented 9 months ago

The PR closes #972.

The readdir returns the contents of a directory all at once, which can be slow (and blocking) when a directory contains many items. The opendir returns the contents of a directory one at a time.

Unlike the original Node.js changes (which copy items one by one), this PR retains copy in parallel (as introduced in #1026).

SukkaW commented 6 months ago

@JPeer264 @manidlou @RyanZim

Just sending a friendly reminder since the PR hasn't been reviewed in three months. Would you mind taking a look at it?

manidlou commented 6 months ago

@SukkaW sorry for long delay! I appreciate the work!