Package Exports
- jsftp-mkdirp
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsftp-mkdirp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
Install
$ npm install jsftp-mkdirp
Usage
const JSFtp = require('jsftp');
// Decorate `JSFtp` with a new method `mkdirp`
require('jsftp-mkdirp')(JSFtp);
const ftp = new JSFtp({
host: 'myserver.com'
});
const path = 'public_html/deploy/foo/bar';
(async () => {
await ftp.mkdirp(path);
console.log('Created path:', path);
});
API
JSFtp.mkdirp(path)
Returns a Promise.
path
Type: string
Path of the nested directories you want to create.
License
MIT © Sindre Sorhus