JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 919
  • Score
    100M100P100Q114870F
  • License MIT

Recursively create nested directories with jsftp, like mkdirp

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

Install with npm

npm install --save jsftp-mkdirp

Example

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) {
    if (err) {
        return cb(err);
    }

    console.log('Created path:', path);
});

API

JSFtp.mkdirp(path, callback)

path

Required
Type: String

Path of the nested directories you want to create.

callback(error)

Type: Function
Default: function () {}

Function to be called when done or error.

License

MIT © Sindre Sorhus