declare const join: (...paths: string[]) => string; declare const normalize: (path: string) => string; declare const relative: (from: string, to: string) => string; declare const resolve: (...paths: string[]) => string; /** * Sanitize a file name by removing invalid characters and normalizing the format. * * - Directory traversal sequences (`./`, `../`) are replaced with a space. * - Invalid characters {@link invalidPattern} are replaced with a space. * - Consecutive whitespace is replaced with a single space. * - Consecutive dots are replaced with a single dot. * - Whitespace around dots is removed. * - Leading and trailing whitespace is removed. * - Trailing dots are discarded. * - Empty filenames return `_` (underscore). * * ## Note: * Reserved Windows filenames (e.g. `CON`, `PRN`, `AUX`, `NUL`, `COM1`, etc.) are prefixed with an underscore. (e.g. `_CON`) * This is to avoid conflicts with reserved names in Windows. * * @param dirname - The file name to sanitize. * @param invalidPattern - A regex pattern or string to match invalid characters. Defaults /[^\w!#$%&'*+,\-;=@[\]^`{}~.]/g */ declare function sanitizeFileName(dirname: string, invalidPattern?: string | RegExp): string; export { join, normalize, relative, resolve, sanitizeFileName };