import type DirectoryOptions from "#DirectoryOptions"; import type Path from "#Path"; import type RemoveOptions from "#RemoveOptions"; import Streamable from "#Streamable"; import type WritableInput from "#WritableInput"; import type { JSONValue, MaybePromise, Printable, StringClass, StringReplacer } from "@rcompat/type"; export type FileInfo = { path: string; name: string; extension: string; fullExtension: string; kind: "file" | "directory" | "link"; }; export type ListOptions = { recursive?: boolean; filter?: RegExp | Filter; }; export type Filter = (info: FileInfo) => MaybePromise; export default class FileRef extends Streamable implements StringClass, Printable { #private; constructor(path: Path); get Name(): "FileRef"; [Symbol.replace](string: string, replacement: string | StringReplacer): string; toString(): string; webpath(): string; import(name?: string): Promise; join(...paths: Path[]): FileRef; kind(): Promise<"file" | "directory" | "link" | null>; list(options?: ListOptions): Promise; files(options?: ListOptions): Promise; dirs(options?: ListOptions): Promise; modified(): Promise; exists(): Promise; bare(append?: string): FileRef; append(suffix: string): FileRef; get path(): string; get directory(): FileRef; get name(): string; get base(): string; get core(): string; get extension(): string; get fullExtension(): string; up(levels: number): FileRef; sibling(name: string): FileRef; or(fallback: () => T): Promise; arrayBuffer(): Promise; bytes(): Promise; text(): Promise; json(): Promise; size(): Promise; copy(to: FileRef, filter?: Filter): Promise; create(options?: DirectoryOptions): Promise; remove(options?: RemoveOptions): Promise; write(input: WritableInput): Promise; writeJSON(input: JSONValue): Promise; discover(filename: string): Promise; debase(base: Path, suffix?: string): FileRef; stream(): ReadableStream; hash(algorithm?: string): Promise; } //# sourceMappingURL=FileRef.d.ts.map