@bonginkan/maria
Version:
MARIA OS v5.9.5 – Self-Evolving Organizational Intelligence OS | Speed Improvement Phase 3: LLM Optimization + Command Refactoring | Performance Measurement + Run Evidence System | Zero ESLint/TypeScript Errors | 人とAIが役割を持ち、学び、進化し続けるための仕事のOS | GraphRAG ×
64 lines (63 loc) • 2.42 kB
TypeScript
export interface FileStats {
_name: string;
_path: string;
isFile: boolean;
isDirectory: boolean;
isSymlink: boolean;
size: number;
created: Date;
modified: Date;
permissions: string;
owner?: string;
}
export interface FileOperationOptions {
recursive?: boolean;
force?: boolean;
preserveTimestamps?: boolean;
backup?: boolean;
dryRun?: boolean;
followSymlinks?: boolean;
}
export interface SearchOptions {
_pattern?: string;
type?: "file" | "directory" | "both";
maxDepth?: number;
caseSensitive?: boolean;
includeHidden?: boolean;
regex?: boolean;
followSymlinks?: boolean;
}
export declare class FileSystemService {
private static instance;
private operationLog;
static getInstance(): FileSystemService;
private constructor();
readFile(_filePath: string, encoding?: BufferEncoding): Promise<string | Buffer>;
writeFile(_filePath: string, _content: string | Buffer, options?: FileOperationOptions): Promise<void>;
deleteFile(_filePath: string, options?: FileOperationOptions): Promise<void>;
createDirectory(_dirPath: string, options?: FileOperationOptions): Promise<void>;
deleteDirectory(_dirPath: string, options?: FileOperationOptions): Promise<void>;
listDirectory(_dirPath: string, options?: SearchOptions): Promise<FileStats[]>;
copyFile(sourcePath: string, destPath: string, options?: FileOperationOptions): Promise<void>;
moveFile(sourcePath: string, destPath: string, options?: FileOperationOptions): Promise<void>;
renameFile(oldPath: string, newPath: string, options?: FileOperationOptions): Promise<void>;
findFiles(_searchPath: string, options?: SearchOptions): Promise<FileStats[]>;
which(command: string): Promise<string | null>;
glob(_pattern: string, options?: SearchOptions): Promise<string[]>;
exists(_filePath: string): Promise<boolean>;
getFileStats(_filePath: string): Promise<FileStats>;
getRealPath(_filePath: string): Promise<string>;
getOperationLog(): Array<{
operation: string;
_path: string;
timestamp: Date;
success: boolean;
}>;
clearOperationLog(): void;
private ensureDirectoryExists;
private createBackup;
private deleteDirectoryRecursive;
private findFilesRecursive;
private logOperation;
}
export declare const _fileSystemService: FileSystemService;