UNPKG

create-ai-chat-context-experimental

Version:

Phase 2: TypeScript rewrite - AI Chat Context & Memory System with conversation extraction and AICF format support (powered by aicf-core v2.1.0).

93 lines 2.03 kB
/** * This file is part of create-ai-chat-context-experimental. * Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). * See LICENSE file for details. */ export interface FileIOOptions { atomic?: boolean; backup?: boolean; permissions?: number; encoding?: BufferEncoding; } export type WriteResult = { ok: true; filePath: string; backupPath?: string; bytesWritten: number; } | { ok: false; error: string; }; /** * File I/O Manager for safe file operations */ export declare class FileIOManager { private readonly defaultOptions; /** * Write content to file with atomic writes and backup support */ writeFile(filePath: string, content: string, options?: FileIOOptions): WriteResult; /** * Read file content */ readFile(filePath: string, encoding?: BufferEncoding): { ok: true; content: string; } | { ok: false; error: string; }; /** * Check if file exists */ fileExists(filePath: string): boolean; /** * Get file size in bytes */ getFileSize(filePath: string): { ok: true; size: number; } | { ok: false; error: string; }; /** * Get file modification time */ getFileModTime(filePath: string): { ok: true; mtime: Date; } | { ok: false; error: string; }; /** * Ensure directory exists */ ensureDirectoryExists(dirPath: string): { ok: true; } | { ok: false; error: string; }; /** * Set file permissions */ setPermissions(filePath: string, permissions: number): { ok: true; } | { ok: false; error: string; }; /** * Get file permissions */ getPermissions(filePath: string): { ok: true; permissions: number; } | { ok: false; error: string; }; } //# sourceMappingURL=FileIOManager.d.ts.map