import FileRef, { type ListOptions } from "#FileRef"; import type Path from "#Path"; import type WritableInput from "#WritableInput"; import type { JSONValue } from "@rcompat/type"; declare function fs_resolve(path?: string): FileRef; declare function project_root(relative_to?: string): Promise; declare const fs: { readonly FileRef: typeof FileRef; readonly ref: (path: Path) => FileRef; readonly cwd: () => FileRef; readonly resolve: typeof fs_resolve; readonly list: (path: Path, opts?: ListOptions) => Promise; readonly files: (path: Path, opts?: ListOptions) => Promise; readonly dirs: (path: Path, opts?: ListOptions) => Promise; readonly exists: (path: Path) => Promise; readonly arrayBuffer: (path: Path) => Promise; readonly bytes: (path: Path) => Promise>; readonly text: (path: Path) => Promise; readonly json: (path: Path) => Promise; readonly stream: (path: Path) => ReadableStream>; readonly write: (path: Path, val: WritableInput) => Promise; readonly writeJSON: (path: Path, val: JSONValue) => Promise; readonly size: (path: Path) => Promise; readonly webpath: (path: Path) => string; readonly join: (path: Path, ...paths: Path[]) => FileRef; readonly discover: (path: Path, filename: string) => Promise; readonly kind: (path: Path) => Promise<"file" | "directory" | "link" | null>; readonly project: { readonly root: typeof project_root; readonly package: (from?: string) => Promise; }; }; export default fs; //# sourceMappingURL=index.d.ts.map