import { IFileSystem } from '../types.js'; /** * 文件系统工具类 * 提供跨平台的文件操作封装 */ export declare class FileSystemUtils { private fs; constructor(fs: IFileSystem); /** * 确保目录存在 */ ensureDir(path: string): Promise; /** * 读取 JSON 文件 */ readJSON(path: string): Promise; /** * 写入 JSON 文件 */ writeJSON(path: string, data: any): Promise; /** * 检查文件是否存在 */ fileExists(path: string): Promise; /** * 获取文件大小 */ getFileSize(path: string): Promise; /** * 列出目录中的所有文件 */ listFiles(dir: string, pattern?: RegExp): Promise; /** * 连接路径 */ joinPath(...parts: string[]): string; /** * 原子性写入(先写临时文件再重命名) */ atomicWrite(path: string, data: any): Promise; } //# sourceMappingURL=fs-utils.d.ts.map