/** * Reads the first line of a file efficiently using Node.js readline. * * @param {string} filePath - The path to the file. * @return {Promise} - The first non-empty line of the file, or an empty string otherwise. */ export declare function readFirstLine(filePath: string): Promise; /** * Reads up to N lines from a file using Node.js readline. * * @param {string} filePath - The path to the file. * @param {number} maxLines - Maximum number of non-empty lines to read. * @return {Promise} - Array of non-empty lines (up to maxLines). */ export declare function readFirstNLines(filePath: string, maxLines: number): Promise; /** * Reads a file from the end and returns the last non-empty line. * * This version supports files that end with: * - "\n" (Unix-style, including modern macOS) * - "\r\n" (Windows-style) * - "\r" (older Mac-style, HL7, etc.) * * @param {string} filePath - The path to the file. * @param {number} [minLength=1] - Minimum length for the returned line. * @return {Promise} - The last non-empty line of the file, or an empty string if no non-empty lines found. */ export declare function getLastLine(filePath: string, minLength?: number): Promise; /** * Suggests similar paths if a file is not found. */ export declare function suggestPathUnderCwd(targetPath: string, workdir: string): Promise; /** * Uses fuzzy matching to find the intended file. */ export declare function findSimilarFile(targetPath: string, workdir: string): Promise;