# jsftp-mkdirp

> Recursively create nested directories with jsftp, like mkdirp

Latest version **5.0.0** (published 2021-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsftp-mkdirp
pnpm add jsftp-mkdirp
yarn add jsftp-mkdirp
bun add jsftp-mkdirp
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2021-08-09 |
| First published | 2013-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | ftp, jsftp, file, transfer, protocol, server, client, upload, deploy, deployment, mkdirp, directory, directories, folder |

## Links

- npm: https://www.npmjs.com/package/jsftp-mkdirp
- Repository: https://github.com/sindresorhus/jsftp-mkdirp
- Homepage: https://github.com/sindresorhus/jsftp-mkdirp#readme
- Issues: https://github.com/sindresorhus/jsftp-mkdirp/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/jsftp-mkdirp

## Dependencies (2)

- [slash](https://npm.io/package/slash.md) ^4.0.0
- [parent-dirs](https://npm.io/package/parent-dirs.md) ^2.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 5.0.0 (latest) — 2021-08-09
- 4.0.0 — 2017-12-17
- 3.0.1 — 2017-11-28
- 3.0.0 — 2016-10-03
- 2.0.1 — 2016-05-19
- 2.0.0 — 2016-05-08
- 1.0.0 — 2014-08-14
- 0.1.2 — 2014-03-28
- 0.1.1 — 2014-03-14
- 0.1.0 — 2013-12-25

## README

# jsftp-mkdirp

> Recursively create nested directories with [jsftp](https://github.com/sergi/jsftp), like [mkdirp](https://github.com/substack/node-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

```js
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.

---
_Source: https://npm.io/package/jsftp-mkdirp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
