UNPKG

@visulima/fs

Version:

Human friendly file system utilities for Node.js

15 lines (14 loc) 500 B
/** * Ensures that the directory exists. * If the directory structure does not exist, it is created. Like mkdir -p. * @param directory The path to the directory to ensure exists. * @example * ```javascript * import ensureDirSync from "@visulima/fs/ensure/ensure-dir-sync"; * * ensureDirSync("/tmp/foo/bar/baz"); * // Creates the directory structure /tmp/foo/bar/baz if it doesn't exist * ``` */ declare const ensureDirSync: (directory: URL | string) => void; export default ensureDirSync;