import { FileSystemHost } from "../fileSystem"; export declare class FileUtils { private static standardizeSlashesRegex; private static trimSlashStartRegex; private static trimSlashEndRegex; static readonly ENOENT = "ENOENT"; private constructor(); /** * Gets if the error is a file not found or directory not found error. * @param err - Error to check. */ static isNotExistsError(err: any): boolean; /** * Joins the paths. * @param paths - Paths to join. */ static pathJoin(...paths: string[]): string; /** * Gets the standardized absolute path. * @param fileSystem - File system. * @param fileOrDirPath - Path to standardize. * @param relativeBase - Base path to be relative from. */ static getStandardizedAbsolutePath(fileSystem: FileSystemHost, fileOrDirPath: string, relativeBase?: string): string; /** * Gets the directory path. * @param fileOrDirPath - Path to get the directory name from. */ static getDirPath(fileOrDirPath: string): string; /** * Gets the base name. * @param fileOrDirPath - Path to get the base name from. */ static getBaseName(fileOrDirPath: string): string; /** * Gets the extension of the file name. * @param fileOrDirPath - Path to get the extension from. */ static getExtension(fileOrDirPath: string): string; /** * Changes all back slashes to forward slashes. * @param fileOrDirPath - Path. */ static standardizeSlashes(fileOrDirPath: string): string; /** * Checks if a path ends with a specified search path. * @param fileOrDirPath - Path. * @param endsWithPath - Ends with path. */ static pathEndsWith(fileOrDirPath: string | undefined, endsWithPath: string | undefined): boolean; /** * Checks if a path starts with a specified search path. * @param fileOrDirPath - Path. * @param startsWithPath - Starts with path. */ static pathStartsWith(fileOrDirPath: string | undefined, startsWithPath: string | undefined): boolean; private static splitPathBySlashes; /** * Gets the parent most paths out of the list of paths. * @param paths - File or directory paths. */ static getParentMostPaths(paths: string[]): string[]; /** * Gets the relative path from one absolute path to another. * @param absoluteDirPathFrom - Absolute directory path from. * @param absolutePathTo - Absolute path to. */ static getRelativePathTo(absoluteDirPathFrom: string, absolutePathTo: string): string; /** * Gets the glob as absolute. * @param glob - Glob. * @param cwd - Current working directory. */ static toAbsoluteGlob(glob: string, cwd: string): string; }