/** * File Operation Utilities * * Common utilities for file operations * * @requirement TASK-3.1 - Refactor to Eliminate Duplication */ /** * Write file with automatic directory creation * * @param filePath - File path * @param content - File content * @param encoding - File encoding (default: 'utf-8') * @throws Error if write fails */ export declare function writeFileSafe(filePath: string, content: string, encoding?: BufferEncoding): Promise; /** * Write JSON file with automatic directory creation * * @param filePath - File path * @param data - JSON data * @param options - Write options * @throws Error if write fails */ export declare function writeJsonSafe(filePath: string, data: any, options?: { spaces?: number; }): Promise; /** * Read JSON file * * @param filePath - File path * @returns Parsed JSON data * @throws Error if read fails */ export declare function readJsonSafe(filePath: string): Promise; /** * Read file * * @param filePath - File path * @param encoding - File encoding (default: 'utf-8') * @returns File content * @throws Error if read fails */ export declare function readFileSafe(filePath: string, encoding?: BufferEncoding): Promise; /** * Check if file exists * * @param filePath - File path * @returns True if file exists */ export declare function fileExists(filePath: string): Promise; /** * Remove file * * @param filePath - File path * @throws Error if removal fails */ export declare function removeFile(filePath: string): Promise; /** * Copy file * * @param srcFile - Source file path * @param destFile - Destination file path * @throws Error if copy fails */ export declare function copyFile(srcFile: string, destFile: string): Promise; /** * Move file * * @param srcFile - Source file path * @param destFile - Destination file path * @throws Error if move fails */ export declare function moveFile(srcFile: string, destFile: string): Promise;