/** * File extension utilities that handle edge cases: * - Hidden files (e.g. `.gitignore`) are not treated as having extensions. * - Filenames with trailing dots (e.g. `file.`) preserve the trailing dot as an extension. * - Filenames that are only a dot or have no extension return empty string or undefined appropriately. */ /** * Extracts the file extension including the leading dot. * * Handles: * - `.hiddenfile` -> `''` * - `file.txt` -> `.txt` * - `file.` -> `.` * - `file` -> `''` * - `.` -> `''` * * @param {string} filename - The filename to parse. * @returns {string} The extension (including dot) or empty string if none. */ export declare function getExtension(filename: string): string; /** * Extracts the extension name (without the dot) from a filename. * * Handles: * - `.hiddenfile` -> `undefined` * - `file.txt` -> `txt` * - `file.` -> `''` * - `file` -> `undefined` * * @param {string} filename - The filename to extract from. * @returns {string | undefined} Extension name or undefined if none. */ export declare function getExtensionName(filename: string): string | undefined; /** * Removes the file extension (including the dot) from the end of a filename. * * Handles: * - `file.txt` -> `file` * - `file.` -> `file` * - `.hiddenfile` -> `.hiddenfile` * - `file` -> `file` * - `.` -> `''` * * @param {string} filename - The filename to modify. * @returns {string} Filename without the extension. */ export declare function removeExtension(filename: string): string;