/** * File Utilities * Provides file system operations with error handling */ /** * Check if a file exists */ export declare function fileExists(filePath: string): Promise; /** * Check if a path is a directory */ export declare function isDirectory(filePath: string): Promise; /** * Read file contents as string */ export declare function readFile(filePath: string): Promise; /** * Write content to file */ export declare function writeFile(filePath: string, content: string | Buffer): Promise; /** * Ensure a directory exists, create if it doesn't */ export declare function ensureDirectory(dirPath: string): Promise; /** * Get file extension */ export declare function getExtension(filePath: string): string; /** * Change file extension */ export declare function changeExtension(filePath: string, newExt: string): string; /** * Get base name without extension */ export declare function getBaseName(filePath: string): string; /** * Resolve path relative to a base path */ export declare function resolvePath(filePath: string, basePath?: string): string; /** * Get relative path from base to target */ export declare function getRelativePath(from: string, to: string): string; /** * Read and encode file as base64 */ export declare function readFileAsBase64(filePath: string): Promise; /** * Get MIME type from file extension */ export declare function getMimeType(filePath: string): string; /** * Get file size in bytes */ export declare function getFileSize(filePath: string): Promise; /** * Format file size for display */ export declare function formatFileSize(bytes: number): string; declare const _default: { fileExists: typeof fileExists; isDirectory: typeof isDirectory; readFile: typeof readFile; writeFile: typeof writeFile; ensureDirectory: typeof ensureDirectory; getExtension: typeof getExtension; changeExtension: typeof changeExtension; getBaseName: typeof getBaseName; resolvePath: typeof resolvePath; getRelativePath: typeof getRelativePath; readFileAsBase64: typeof readFileAsBase64; getMimeType: typeof getMimeType; getFileSize: typeof getFileSize; formatFileSize: typeof formatFileSize; }; export default _default; //# sourceMappingURL=file-utils.d.ts.map