/** * Resolves a user-provided path into an absolute path. * * If the path is already absolute, it is returned as is, otherwise it is * resolved relative to the root. * * @param root A root path to resolve relative paths against. * @param target The target path to resolve. * @returns An absolute path. */ export declare function resolveFromRoot(root: string, target: string): string; /** * Tries to return a shorter version of the path if its inside the given folder. * * This is useful for displaying paths in the terminal, as they can be shorter * when they are inside the current working directory. For example, if the * current working directory is `/home/user/project`, and the path is * `/home/user/project/contracts/File.sol`, the shorter path is * `contracts/File.sol`. * * @param absolutePath The path to shorten. * @param folder The absolute path to the folder. * @returns The shorter path, if possible, or the original path. */ export declare function shortenPath(absolutePath: string): string; /** * Returns a version of {@link name} that is safe to use as a single filename * component on POSIX, macOS, and Windows. * * Strips characters that are reserved on at least one of those platforms * (`<>:"/\|?*` and ASCII control chars), trims trailing dots and whitespace * (Windows silently strips them on write), avoids Windows reserved device * names, and falls back to `_` if the result is empty or one of the * path-traversal literals `.` / `..`. * * @param name The string to sanitize. * @returns A non-empty filename-safe string. */ export declare function sanitizeFilename(name: string): string; //# sourceMappingURL=path.d.ts.map