This is a request for expanding the rmdir function to allow for recursive deletion of a directory.
Currently, rmdir accepts only two parameters:
To maintain backward compatibility, I propose to expand the function to three parameters, where the 2nd parameter becomes options and the 3rd becomes cb. options is an optional Object with a fallback to cb.
SFTPWrapper.prototype.rmdir = function(path, options, cb) {
if (!options || "object" != options) {
cb = options;
options = {};
}
// Perform directory deletion
};
The options Object may of course contain numerous keys. But for this request, I have the following in mind:
var options = {
resursive: true
};
This is a request for expanding the
rmdirfunction to allow for recursive deletion of a directory.Currently,
rmdiraccepts only two parameters:pathcbTo maintain backward compatibility, I propose to expand the function to three parameters, where the 2nd parameter becomes
optionsand the 3rd becomescb.optionsis an optional Object with a fallback tocb.The
optionsObject may of course contain numerous keys. But for this request, I have the following in mind: