UNPKG

packfs-core

Version:

Semantic filesystem operations for LLM agent frameworks with natural language understanding. See LLM_AGENT_GUIDE.md for copy-paste examples.

46 lines 1.37 kB
/** * Core filesystem interface for PackFS */ import type { FileMetadata, ReadOptions, WriteOptions } from './types.js'; import { CategoryLogger } from './logger.js'; export declare abstract class FileSystemInterface { protected logger: CategoryLogger; constructor(); /** * Read file contents */ abstract readFile(path: string, options?: ReadOptions): Promise<string | Buffer>; /** * Write file contents */ abstract writeFile(path: string, data: string | Buffer, options?: WriteOptions): Promise<void>; /** * Check if file or directory exists */ abstract exists(path: string): Promise<boolean>; /** * Get file metadata */ abstract stat(path: string): Promise<FileMetadata>; /** * List directory contents */ abstract readdir(path: string): Promise<string[]>; /** * Create directory */ abstract mkdir(path: string, recursive?: boolean): Promise<void>; /** * Remove file or directory */ abstract remove(path: string, recursive?: boolean): Promise<void>; /** * Copy file or directory */ abstract copy(source: string, destination: string): Promise<void>; /** * Move/rename file or directory */ abstract move(source: string, destination: string): Promise<void>; } //# sourceMappingURL=filesystem.d.ts.map