Skip to content

SFTP: rmdir recursively #437

@kafoso

Description

@kafoso

This is a request for expanding the rmdir function to allow for recursive deletion of a directory.

Currently, rmdir accepts only two parameters:

  • path
  • cb

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
};

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions