$ gnpm install write-dir-safe
Create directories and their parents recursively.
If I should maintain this repo, please ⭐️
DM me on Twitter if you have questions or suggestions.
Create directories and their parents recursively.
true
if directory now exists.false
if unable to create directory.undefined
on other errors (ex: permission denied) rather than throwing.yarn add write-dir-safe
npm install write-dir-safe
pnpm add write-dir-safe
import { writeDir, writeDirSync, Options } from "write-dir-safe";
function writeDir(path: string, options: Options): Promise<boolean | undefined>;
function writeDirSync(path: string, options: Options): boolean | undefined;
type Options = {
/**
* Recursively create parent directories as well. Default: `true`
*/
recursive?: boolean;
};
MIT - MIT License
Copyright 2013 - present © cnpmjs.org | Home |