Skip to content

Recursively create nested directories with jsftp, like mkdirp

License

Notifications You must be signed in to change notification settings

cjz9032/jsftp-mkdirp

 
 

Repository files navigation

jsftp-mkdirp Build Status

Recursively create nested directories with jsftp, like mkdirp

FTP can natively create only one directory at the time.

Useful for being able to upload files to deep paths without knowing if the directories exists beforehand.

Install

$ npm install --save jsftp-mkdirp

Usage

var JSFtp = require('jsftp');

// decorate `JSFtp` with a new method `mkdirp`
JSFtp = require('jsftp-mkdirp')(JSFtp);

var path = 'public_html/deploy/foo/bar';

ftp.mkdirp(path, function (err) {
	console.log('Created path:', path);
});

API

JSFtp.mkdirp(path, callback)

path

Required
Type: string

Path of the nested directories you want to create.

License

MIT © Sindre Sorhus

About

Recursively create nested directories with jsftp, like mkdirp

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%