node package manager

jsftp-mkdirp

Recursively create nested directories with jsftp, like mkdirp

jsftp-mkdirp

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.

$ npm install --save jsftp-mkdirp
const JSFtp = require('jsftp');
 
// decorate `JSFtp` with a new method `mkdirp` 
require('jsftp-mkdirp')(JSFtp);
 
const path = 'public_html/deploy/foo/bar';
 
ftp.mkdirp(path).then(() => {
    console.log('Created path:', path);
});

Returns a Promise.

Type: string

Path of the nested directories you want to create.

MIT © Sindre Sorhus