import type DirectoryOptions from "#DirectoryOptions"; import type { FileInfo, Filter, ListOptions } from "#FileRef"; import FileRef from "#FileRef"; import type FileType from "#FileType"; import type Path from "#Path"; import type Streamable from "#Streamable"; import type WritableInput from "#WritableInput"; import type { JSONValue } from "@rcompat/type"; type NamedStreamable = Streamable & { name: string; }; declare function fs_resolve(path?: string): FileRef; declare function ref(path: Path): FileRef; declare function isStream(x: unknown): x is Streamable; declare function isNamedStream(x: unknown): x is NamedStreamable; declare const fs: { ref: typeof ref; isRef: typeof FileRef.is; isStream: typeof isStream; isNamedStream: typeof isNamedStream; cwd: () => FileRef; create: (path: Path, options?: DirectoryOptions) => Promise; resolve: typeof fs_resolve; list: (path: Path, opts?: ListOptions) => Promise; files: (path: Path, opts?: ListOptions) => Promise; dirs: (path: Path, opts?: ListOptions) => Promise; exists: (path: Path) => Promise; arrayBuffer: (path: Path) => Promise; bytes: (path: Path) => Promise>; text: (path: Path) => Promise; json: (path: Path) => Promise; stream: (target: string | Streamable) => ReadableStream; write: (path: Path, val: WritableInput) => Promise; writeJSON: (path: Path, val: JSONValue) => Promise; size: (path: Path) => Promise; webpath: (path: Path) => string; join: (path: Path, ...paths: Path[]) => FileRef; discover: (path: Path, filename: string) => Promise; type: (path: Path) => Promise<"directory" | "file" | "link" | null>; }; export default fs; export type { FileInfo, FileRef, FileType, Filter, ListOptions, NamedStreamable, Path, Streamable }; //# sourceMappingURL=index.d.ts.map