node/lib/internal/fs
Colin Ihrig d4a6f2caf1
fs: use async directory processing in cp()
The readdir() functions do not scale well, which is why
opendir(), etc. were introduced. This is exacerbated in the
current cp() implementation, which calls readdir() recursively.

This commit updates cp() to use the opendir() style iteration.

PR-URL: https://github.com/nodejs/node/pull/41351
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-01-14 16:19:44 +01:00
..
cp fs: use async directory processing in cp() 2022-01-14 16:19:44 +01:00
dir.js
promises.js fs: fix length option being ignored during read() 2021-12-13 17:14:17 -05:00
read_file_context.js fs: propagate abortsignal reason in new AbortSignal constructors 2021-12-13 17:14:09 -05:00
rimraf.js fs: fix rmsync error swallowing 2021-05-25 07:18:05 -07:00
streams.js fs: make open and close stream override optional when unused 2021-09-17 00:45:08 +02:00
sync_write_stream.js
utils.js lib: include return types in JSDoc 2021-12-13 17:14:20 -05:00
watchers.js fs: propagate abortsignal reason in new AbortSignal constructors 2021-12-13 17:14:09 -05:00