Closed bcheidemann closed 3 years ago
Nice find.
We sort of have code to do this already in the shell, but it could be ported into the implementation for when { recursive: true }
is present, see https://github.com/filerjs/filer/blob/75f2a70c7b8111987f0df6c9105c1b6c65bef3c4/src/shell/shell.js#L205-L280.
Nice find.
We sort of have code to do this already in the shell, but it could be ported into the implementation for when
{ recursive: true }
is present, see.
Happy to update PR #778 to include the required changes but may not have time until next weekend. Looks like node supports encoding and withFileTypes options but not recursive for readdir. Do you want to implement it with support for recursive anyway?
Ah, you're right. If node doesn't, let's not do it either, and leave ls
for this case.
Nice find. We sort of have code to do this already in the shell, but it could be ported into the implementation for when
{ recursive: true }
is present, see https://github.com/filerjs/filer/blob/75f2a70c7b8111987f0df6c9105c1b6c65bef3c4/src/shell/shell.js#L205-L280.
Happy to update PR #778 to include the required changes but may not have time until next weekend. Looks like node supports encoding and withFileTypes options but not recursive for readdir. Do you want to implement it with support for recursive anyway?
@humphd added a skip as you suggested here. I'll make a new PR for the fixes if you want to merge #778
The following code:
Throws the error:
Error: Uncaught TypeError: callback is not a function (http://localhost:1234/tests.e31bb0bc.js:17740) at commonjsGlobal.onerror (mocha.947ba722.js:32655:12)
According to the node documentation, fs.readdir and fs.promises.readdir should optionally accept an options object.