@stryke/fs
Version:
A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.
32 lines • 1 kB
text/typescript
//#region src/get-parent-path.d.ts
interface GetParentPathOptions {
/**
* Whether to ignore the case of the file names when checking for existence.
*
* @defaultValue true
*/
ignoreCase: boolean;
/**
* Whether to skip the current working directory when checking for the file.
*
* @defaultValue false
*/
skipCwd: boolean;
/**
* Should we include the found file/directory name in the results.
*
* @defaultValue false
*/
includeNameInResults?: boolean;
}
/**
* Get the first parent path that has a file or directory with the provided name.
*
* @param name - The name (or names) of the file to look for in the parent paths.
* @param cwd - The current working directory.
* @returns The first parent path that exists.
*/
declare const getParentPath: (name: string | string[], cwd?: any, options?: Partial<GetParentPathOptions>) => string | undefined;
//#endregion
export { GetParentPathOptions, getParentPath };
//# sourceMappingURL=get-parent-path.d.mts.map