/** * Cached file reader for non-changing files. * Reads from filesystem on first access, then serves from cache. */ declare class CachedFileReader { private cache; /** * Reads a file from cache if available, otherwise reads from filesystem and caches the result. * @param filePath - Absolute path to the file to read * @param encoding - File encoding (default: 'utf-8') * @returns The file contents as a string */ read(filePath: string, encoding?: BufferEncoding): string; /** * Asynchronously reads a file from cache if available, otherwise reads from filesystem and caches the result. * @param filePath - Absolute path to the file to read * @param encoding - File encoding (default: 'utf-8') * @returns Promise resolving to the file contents as a string */ readAsync(filePath: string, encoding?: BufferEncoding): Promise; /** * Flushes the entire cache. */ flushCache(): void; /** * Flushes a specific file from the cache. * @param filePath - Absolute path to the file to flush * @param encoding - File encoding (default: 'utf-8') */ flushFile(filePath: string, encoding?: BufferEncoding): void; /** * Checks if a file is cached. * @param filePath - Absolute path to the file * @param encoding - File encoding (default: 'utf-8') * @returns true if the file is cached, false otherwise */ isCached(filePath: string, encoding?: BufferEncoding): boolean; /** * Gets the number of cached files. * @returns The number of files currently in cache */ getCacheSize(): number; } export { CachedFileReader }; //# sourceMappingURL=cachedFileReader.d.ts.map