UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

34 lines (33 loc) 1.27 kB
/** * @fileoverview File reading utilities. * * This module provides utilities for reading files and directories, * with error handling and logging. */ import { FileInfo } from '../types/review'; /** * Read a file and return its content * @param filePath Path to the file * @returns Promise resolving to the file content * @throws Error if the file cannot be read */ export declare function readFile(filePath: string): Promise<string>; /** * Read a file and return its content with file info * @param filePath Path to the file * @returns Promise resolving to a FileInfo object */ export declare function readFileWithInfo(filePath: string): Promise<FileInfo>; /** * Read multiple files and return their contents with file info * @param filePaths Array of file paths * @returns Promise resolving to an array of FileInfo objects */ export declare function readFilesWithInfo(filePaths: string[]): Promise<FileInfo[]>; /** * Read all files in a directory recursively * @param dirPath Path to the directory * @param filter Optional filter function to exclude certain files * @returns Promise resolving to an array of file paths */ export declare function readFilesInDirectory(dirPath: string, filter?: (filePath: string) => boolean): Promise<string[]>;