@stryke/path
Version:
A package containing various utilities that expand the functionality of NodeJs's built-in `path` module
47 lines (46 loc) • 1.81 kB
TypeScript
/**
* Check if the given path is a file.
*
* @param path - The location to check
* @param additionalPath - An optional additional path to add to the start of the path
* @returns An indicator specifying if the path is a file
*/
export declare function isFile(path: string, additionalPath?: string): boolean;
/**
* Check if the given path is a directory.
*
* @param path - The location to check
* @param additionalPath - An optional additional path to add to the start of the path
* @returns An indicator specifying if the path is a directory
*/
export declare function isDirectory(path: string, additionalPath?: string): boolean;
/**
* Check if the given path is a file . Does not dereference symbolic links.
*
* @param path - The location to check
* @param additionalPath - An optional additional path to add to the start of the path
* @returns An indicator specifying if the path is a file
*/
export declare const isFileSymlink: (path: string, additionalPath?: string) => boolean;
/**
* Check if the given path is a directory. Does not dereference symbolic links.
*
* @param path - The location to check
* @param additionalPath - An optional additional path to add to the start of the path
* @returns An indicator specifying if the path is a directory
*/
export declare const isDirectorySymlink: (path: string, additionalPath?: string) => boolean;
/**
* Check if the path is an absolute path.
*
* @param path - The path to check
* @returns An indicator specifying if the path is an absolute path
*/
export declare function isAbsolutePath(path: string): boolean;
/**
* Check if the path is a relative path.
*
* @param path - The path to check
* @returns An indicator specifying if the path is a relative path
*/
export declare function isRelativePath(path: string): boolean;