source: trip-planner-front/node_modules/less/node_modules/make-dir/index.d.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/// <reference types="node"/>
2import * as fs from 'fs';
3
4export interface Options {
5 /**
6 * Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/).
7 *
8 * @default 0o777 & (~process.umask())
9 */
10 readonly mode?: number;
11
12 /**
13 * Use a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs).
14 *
15 * Using a custom `fs` implementation will block the use of the native `recursive` option if `fs.mkdir` or `fs.mkdirSync` is not the native function.
16 *
17 * @default require('fs')
18 */
19 readonly fs?: typeof fs;
20}
21
22/**
23 * Make a directory and its parents if needed - Think `mkdir -p`.
24 *
25 * @param path - Directory to create.
26 * @returns A `Promise` for the path to the created directory.
27 */
28export default function makeDir(
29 path: string,
30 options?: Options
31): Promise<string>;
32
33/**
34 * Synchronously make a directory and its parents if needed - Think `mkdir -p`.
35 *
36 * @param path - Directory to create.
37 * @returns The path to the created directory.
38 */
39export function sync(path: string, options?: Options): string;
Note: See TracBrowser for help on using the repository browser.