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).
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. Theopendir
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).