/** * File system utilities - Browser stubs. * * In browser environment, file system operations are not available. * This module provides stub implementations that throw helpful errors. * * @module */ export { globToRegex, matchGlob, matchGlobAny, createGlobMatcher, clearGlobCache, normalizePath } from "./glob.js"; /** * Information about a file system entry. */ export interface FileEntry { absolutePath: string; relativePath: string; isDirectory: boolean; size: number; mtime: Date; } export interface TraverseOptions { recursive?: boolean; followSymlinks?: boolean; filter?: (entry: FileEntry) => boolean; } export interface GlobOptions { cwd?: string; ignore?: string | string[]; dot?: boolean; followSymlinks?: boolean; filter?: (entry: FileEntry) => boolean; } export declare function traverseDirectory(_dirPath: string, _options?: TraverseOptions): AsyncGenerator; export declare function traverseDirectorySync(_dirPath: string, _options?: TraverseOptions): FileEntry[]; export declare function glob(_pattern: string, _options?: GlobOptions): AsyncGenerator; export declare function globSync(_pattern: string, _options?: GlobOptions): FileEntry[]; export declare function fileExists(_filePath: string): Promise; export declare function fileExistsSync(_filePath: string): boolean; export declare function ensureDir(_dirPath: string): Promise; export declare function ensureDirSync(_dirPath: string): void; export declare function safeStats(_filePath: string): Promise; export declare function safeStatsSync(_filePath: string): null; export declare function readFileBytes(_filePath: string): Promise; export declare function readFileBytesSync(_filePath: string): Uint8Array; export declare function writeFileBytes(_filePath: string, _data: Uint8Array): Promise; export declare function writeFileBytesSync(_filePath: string, _data: Uint8Array): void; export declare function setFileTime(_filePath: string, _mtime: Date): Promise; export declare function setFileTimeSync(_filePath: string, _mtime: Date): void; export declare function readFileText(_filePath: string, _encoding?: string): Promise; export declare function readFileTextSync(_filePath: string, _encoding?: string): string; export declare function writeFileText(_filePath: string, _content: string, _encoding?: string): Promise; export declare function writeFileTextSync(_filePath: string, _content: string, _encoding?: string): void; export declare function remove(_targetPath: string): Promise; export declare function removeSync(_targetPath: string): void; export declare function copyFile(_src: string, _dest: string): Promise; export declare function copyFileSync(_src: string, _dest: string): void; export interface ReadStreamOptions { encoding?: BufferEncoding | null; highWaterMark?: number; start?: number; end?: number; autoClose?: boolean; } export interface WriteStreamOptions { encoding?: BufferEncoding; highWaterMark?: number; flags?: string; mode?: number; autoClose?: boolean; } export declare function createReadStream(_filePath: string, _options?: ReadStreamOptions): never; export declare function createWriteStream(_filePath: string, _options?: WriteStreamOptions): never; export declare function createTempDir(_prefix?: string): Promise; export declare function createTempDirSync(_prefix?: string): string;