🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

jsftp-mkdirp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsftp-mkdirp

Recursively create nested directories with jsftp, like mkdirp

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
580
-2.52%
Maintainers
1
Weekly downloads
 
Created
Source

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

import JsFtp from 'jsftp';
import JsFtpMkdirp from 'jsftp-mkdirp';

// Decorate `JSFtp` with a new method `mkdirp`
JsFtpMkdirp(JSFtp);

const ftp = new JsFtp({
	host: 'myserver.com'
});

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

await ftp.mkdirp(path);
console.log('Created path:', path);

API

JsFtp.mkdirp(path)

Returns a Promise.

path

Type: string

The path of the nested directories you want to create.

Keywords

ftp

FAQs

Package last updated on 09 Aug 2021

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