# mkpath

> Make all directories in a path, like mkdir -p

Latest version **1.0.0** (published 2015-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install mkpath
pnpm add mkpath
yarn add mkpath
bun add mkpath
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-10-30 |
| First published | 2012-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/mkpath) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jonathan Rajavuori |
| Maintainers | jrajav |
| Keywords | mkdir, mkdirp, directory, path, tree |

## Links

- npm: https://www.npmjs.com/package/mkpath
- Repository: https://github.com/jrajav/mkpath
- Homepage: https://github.com/jrajav/mkpath#readme
- Issues: https://github.com/jrajav/mkpath/issues
- npm.io page: https://npm.io/package/mkpath

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-10-30
- 0.1.0 — 2012-11-15

## README

# mkpath

Make all directories in a path, like `mkdir -p`.

## How to use

    var mkpath = require('mkpath');
    
    mkpath('red/green/violet', function (err) {
        if (err) throw err;
        console.log('Directory structure red/green/violet created');
    });
    
    mkpath.sync('/tmp/blue/orange', 0700);

### mkpath(path, [mode = 0777 & (~process.umask()),] [callback])

Create all directories that don't exist in `path` with permissions `mode`. When finished, `callback(err)` fires with the error, if any.

### mkpath.sync(path, [mode = 0777 & (~process.umask())]);

Synchronous version of the same. Throws error, if any.

## License

This software is released under the [MIT license](http://www.opensource.org/licenses/MIT).

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