import fs from "fs"; /** * Safely reads a file with proper error handling * @param path Path to the file to read * @param encoding File encoding (default: 'utf-8') * @returns Contents of the file */ export declare const safeReadFile: (path: string, encoding?: BufferEncoding) => string; /** * Safely writes data to a file with proper error handling * @param path Path to the file to write * @param data Data to write to the file * @param options Write file options */ export declare const safeWriteFile: (path: string, data: string | Buffer | object, options?: fs.WriteFileOptions) => void; /** * Safely creates a directory with proper error handling * @param path Path to the directory to create * @param options Directory creation options */ export declare const safeMkdir: (path: string, options?: { recursive: boolean; }) => void; /** * Safely checks if a file or directory exists * @param path Path to check * @returns True if the path exists, false otherwise */ export declare const safeExists: (path: string) => boolean; /** * Safely deletes a file with proper error handling * @param path Path to the file to delete */ export declare const safeUnlink: (path: string) => void; /** * Safely reads a directory with proper error handling * @param path Path to the directory to read * @returns Array of directory contents */ export declare const safeReadDir: (path: string) => string[]; /** * Safely reads and parses a JSON file * @param path Path to the JSON file * @returns Parsed JSON object */ export declare const safeReadJson: (path: string) => T;