New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.rmdir looks not support "recursive" #292
Comments
You are right, recursive is only implemented for mkdir now. I will try to implement it when I got time. But you are welcome to contribute :-) |
I'm trying to implement this feature in my local, however. the And I also found where the error message coming from
The arguments[0], Line 35 in 9832d66
I think there has some difference in Node v12 ? |
From nodejs source code function lazyLoadRimraf() {
if (rimraf === undefined)
({ rimraf, rimrafSync } = require('internal/fs/rimraf'));
}
function rmdir(path, options, callback) {
if (typeof options === 'function') {
callback = options;
options = undefined;
}
callback = makeCallback(callback);
path = pathModule.toNamespacedPath(getValidatedPath(path));
options = validateRmdirOptions(options);
if (options.recursive) {
lazyLoadRimraf();
return rimraf(path, options, callback);
}
const req = new FSReqCallback();
req.oncomplete = callback;
binding.rmdir(path, req);
} The I will try to glue them up. |
There is missing support of "path <string> | <Buffer> | <URL>" on many fs APIs. closes #292
Because nodejs v12 implemented recursive rmdir though The broken support was due to a bug of mock-fs: not supporting Buffer typed path input. More details in #293. |
There is missing support of "path <string> | <Buffer> | <URL>" on many fs APIs. closes #292
There is missing support of "path <string> | <Buffer> | <URL>" on many fs APIs. closes #292
Please bump a new version for changes. thanks a lot |
Fix published in |
Will get error
The text was updated successfully, but these errors were encountered: