tar
Version:
tar for JavaScript
30 lines • 1.21 kB
TypeScript
import type { ExtractFS, ExtractFSSync } from './fs.js';
/** The options of `mkdir`. Each path has `/` separators. */
export type MkdirOptions = {
/** The owner of each directory that is made, if it has `gid` also. */
uid?: number;
gid?: number;
processUid?: number;
processGid?: number;
/** If the mode has a bit of this mask, `chmod` sets the mode. */
umask: number;
/** Permit a symbolic link in the path. */
preserve: boolean;
/** Remove an object in the path that is not a directory. */
unlink: boolean;
/** The absolute path of the extraction directory. */
cwd: string;
mode: number;
};
/**
* Make the directory `dir` and its parents, below `opt.cwd`.
*
* If `opt.preserve` is not set, a symbolic link in the path is an
* error, so that no entry is extracted through a link. The
* extraction directory itself is never made: it must be a directory,
* or the error is a `CwdError`.
*/
export declare const mkdir: (fs: ExtractFS, dir: string, opt: MkdirOptions) => Promise<void>;
/** The sync form of `mkdir`. */
export declare const mkdirSync: (fs: ExtractFSSync, dir: string, opt: MkdirOptions) => void;
//# sourceMappingURL=mkdir.d.ts.map