/** * Universal File System implementation * Browser: Uses OPFS (Origin Private File System) * Node.js: Uses built-in fs/promises * Serverless: Uses memory-based fallback */ /** * Universal file operations interface */ export interface UniversalFS { readFile(path: string, encoding?: string): Promise; writeFile(path: string, data: string, encoding?: string): Promise; mkdir(path: string, options?: { recursive?: boolean; }): Promise; exists(path: string): Promise; readdir(path: string): Promise; readdir(path: string, options: { withFileTypes: true; }): Promise<{ name: string; isDirectory(): boolean; isFile(): boolean; }[]>; unlink(path: string): Promise; stat(path: string): Promise<{ isFile(): boolean; isDirectory(): boolean; }>; access(path: string, mode?: number): Promise; } export declare const readFile: (path: string, encoding?: string) => Promise; export declare const writeFile: (path: string, data: string, encoding?: string) => Promise; export declare const mkdir: (path: string, options?: { recursive?: boolean; }) => Promise; export declare const exists: (path: string) => Promise; export declare const readdir: { (path: string): Promise; (path: string, options: { withFileTypes: true; }): Promise<{ name: string; isDirectory(): boolean; isFile(): boolean; }[]>; }; export declare const unlink: (path: string) => Promise; export declare const stat: (path: string) => Promise<{ isFile(): boolean; isDirectory(): boolean; }>; export declare const access: (path: string, mode?: number) => Promise; declare const _default: { readFile: (path: string, encoding?: string) => Promise; writeFile: (path: string, data: string, encoding?: string) => Promise; mkdir: (path: string, options?: { recursive?: boolean; }) => Promise; exists: (path: string) => Promise; readdir: { (path: string): Promise; (path: string, options: { withFileTypes: true; }): Promise<{ name: string; isDirectory(): boolean; isFile(): boolean; }[]>; }; unlink: (path: string) => Promise; stat: (path: string) => Promise<{ isFile(): boolean; isDirectory(): boolean; }>; access: (path: string, mode?: number) => Promise; }; export default _default; export declare const promises: { readFile: (path: string, encoding?: string) => Promise; writeFile: (path: string, data: string, encoding?: string) => Promise; mkdir: (path: string, options?: { recursive?: boolean; }) => Promise; exists: (path: string) => Promise; readdir: { (path: string): Promise; (path: string, options: { withFileTypes: true; }): Promise<{ name: string; isDirectory(): boolean; isFile(): boolean; }[]>; }; unlink: (path: string) => Promise; stat: (path: string) => Promise<{ isFile(): boolean; isDirectory(): boolean; }>; access: (path: string, mode?: number) => Promise; };