import { VfsInterface } from "../types";
import { FileSystem, FileType } from '@volar/language-service';
import { URI } from 'vscode-uri';
import { CborUint8Array } from "@jsonjoy.com/json-pack/lib/cbor/types";
import { SnapshotNode } from "@joinezco/memfs/snapshot";
import { promises } from "node:fs";
import type { FsApi } from "@joinezco/memfs/node/types";
import { TopLevelFs } from "@joinezco/jswasi/filesystem";
export declare namespace Vfs {
    const fromJswasiFs: (jswasiFs: TopLevelFs) => Promise<VfsInterface>;
    const fromMemfs: (fs: FsApi) => VfsInterface;
    const fromNodelike: (fs: typeof promises) => VfsInterface;
    /**
     * Create a filesystem worker with optional snapshot data.
     *
     * @param bufferOrUrl - Either a snapshot buffer or URL to a snapshot file.
     *                     If a URL is provided, it will be loaded directly in the worker
     *                     for better performance with large files.
     */
    const worker: (bufferOrUrl?: CborUint8Array<SnapshotNode> | string) => Promise<VfsInterface>;
    function walk(fs: VfsInterface, path: string): AsyncIterable<string>;
}
export declare class VolarFs implements FileSystem {
    #private;
    constructor(fs: VfsInterface);
    stat(uri: URI): Promise<any>;
    readDirectory(uri: URI): Promise<[string, FileType][]>;
    readFile(uri: URI): Promise<string>;
}
