tschaub / mock-fs

Configurable mock for the fs module
https://npmjs.org/package/mock-fs
Other
906 stars 86 forks source link

Support for `fs.cp()`, fs.cpSync()`, `fsPromises.cp()`? #358

Open rauschma opened 2 years ago

rauschma commented 2 years ago

The following three functions were added in Node.js v16.7.0 and are very useful because they enable you to copy directories recursively. AFAICT, mock-fs does not currently support them:

3cp commented 2 years ago
ENOENT: no such file or directory, opendir 'a'

Unfortunately, these new apis use opendir internally.

319

Currently there is no way to support it, because nodejs has no intention to expose the new fs_dir binding for us to mock.