mise API - v0.0.0
    Preparing search index...

    Class VFS

    Index
    • Gets data for a directory (Virtual or Native). Separated from rendering to allow Result pattern.

      Parameters

      • OptionaltargetPath: string

        The path to get data for. If empty, uses CWD.

      • options: {
            directory?: boolean;
            reverse?: boolean;
            sort?: "size" | "name" | "owner" | "date";
        } = {}

        Options including directory flag and sort.

      Returns Promise<Result<ListingItem[]>>

      Result<ListingItem[]> - Ok with items or Err with error message.

    • List contents of a directory (Virtual or Native). Convenience method that fetches data and renders it. Implements optimistic rendering with progress feedback:

      • Stale cache: serve immediately with "(cached, refreshing...)" indicator
      • Cache miss: show "Fetching..." after 500ms if still loading

      Parameters

      • OptionaltargetPath: string

        The path to list. If empty, uses CWD.

      • options: {
            directory?: boolean;
            human?: boolean;
            long?: boolean;
            oneColumn?: boolean;
            reverse?: boolean;
            sort?: "size" | "name" | "owner" | "date";
        } = {}

        Listing options (long, human, sort, reverse, directory).

      • Optionalkept: { listing?: VfsListing }

      Returns Promise<
          {
              errors?: { message: string; type: "error"
              | "warning" }[];
              model?: { data: unknown; kind: string };
              rendered: string;
              renderedErr?: string;
              status: "error" | "ok";
              trace?: {
                  executed?: string;
                  input: string;
                  proposed: string;
                  validated: boolean;
              };
          },
      >

    • Resolves a directory listing with its freshness. A fresh cached listing is served as is. A stale one is served at once only when a host can carry the refresh (an ambient listener exists — the daemon), with the revalidation running behind it; at a plain console the stale entry is refetched in line, because nobody would deliver the refresh. /proc paths never touch this cache.

      Parameters

      • OptionaltargetPath: string

        The path to list; the working directory when empty.

      • options: {
            directory?: boolean;
            reverse?: boolean;
            sort?: "size" | "name" | "owner" | "date";
        } = {}

        Sort and -d options.

      Returns Promise<Result<VfsListing>>

      The listing, its absolute path, and whether it is current.