Socket
Book a DemoInstallSign in
Socket

jsftp-rmr

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsftp-rmr

Recursively delete non-empty nested directories with jsftp, like 'rm -r'

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

jsftp-rmr

Recursively delete non-empty nested directories with jsftp, like 'rm -r'

FTP can natively delete only one directory at the time and it must be empty.

Useful for being able to clean up remote directories before uploading files.

Install

$ npm install --save jsftp-rmr

Usage

var jsFtp = require('jsftp');

// decorate `jsFtp` with a new method `rmr`
jsFtp = require('jsftp-rmr')(jsFtp);

var remoteDirectory = 'public_html/deploy'
    ftp = new jsFtp(options);

ftp.rmr(remoteDirectory, function (err) {
	console.log('Successfully removed:', remoteDirectory);
});

API

jsFtp.rmr(remoteDirectory, callback)

remoteDirectory

Required
Type: string

Path of the remote directory to recursively remove.

Note

Using this command in production can be dangerous. Use it at your own risk.

License

MIT © Alberto Mijares

Keywords

jsftp

FAQs

Package last updated on 22 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.