import { FilesystemOptions, FilesystemOptionsPath, FilesystemOptionsFs } from './types.cjs'; import { ValidatePayload, ValidateResult } from '../validator/validate.cjs'; import '../validator/valibot.cjs'; import 'valibot'; import '../validator/types.cjs'; type Filesystem = ReturnType; interface ReadOptions { recursive?: boolean; } interface ReadRecordOptions extends ReadOptions { reviver?: (key: any, value: any) => any; default?: Record; schema?: ValidatePayload; } type ReadOutput = T extends { schema: ValidatePayload; } ? ValidateResult | null : Record | null; declare function createFilesystem(options?: T): { path: FilesystemOptionsPath; fs: FilesystemOptionsFs; exists: (path: string) => Promise; existsSync: (path: string) => boolean; read: { (filepath: string): Promise; text(filepath: string, options?: any): Promise; json(filepath: string, options?: T_1): Promise>; yaml(filepath: string, options?: any): Promise; }; readSync: { (filepath: string): Uint8Array; text(filepath: string, defaultValue?: string): string; json(filepath: string, options?: T_1): ReadOutput; yaml(filepath: string, options?: any): any; }; readdir: (filepath: string) => Promise; readdirSync: (filepath: string) => string[]; write: { (filename: string, content: Uint8Array, options?: any): Promise; text(filename: string, content: string, options?: any): Promise; json(filename: string, content: any, options?: any): Promise; }; writeSync: { (filename: string, content: Uint8Array, options?: any): void; text(filename: string, content: string, options?: any): void; json(filename: string, content: any, options?: any): void; }; mkdir: (filepath: string, options?: any) => Promise; mkdirSync: (filepath: string, options?: any) => void; remove: (filepath: string) => Promise; removeSync: (filepath: string) => void; removeAt: (filepath: string, miliseconds: number) => Promise; }; export { type Filesystem, type ReadOptions, type ReadOutput, type ReadRecordOptions, createFilesystem };