drupflare/drangler - v0.1.0
    Preparing search index...

    Interface FileHost

    The filesystem seam.

    Same reasoning as CommandRunner: the workspace scan, the secret scan and every read of a survey or a dump go through this, so a spec builds a tree in a plain object.

    interface FileHost {
        exists(path: string): boolean;
        readBytes(path: string): Uint8Array;
        readDir(path: string): DirEntry[];
        readText(path: string): string;
        size(path: string): number;
        writeBytes(path: string, bytes: Uint8Array): void;
        writeText(path: string, text: string): void;
    }

    Hierarchy (View Summary)

    Index
    • Parameters

      • path: string

      Returns boolean

    • raw bytes, because a database and a files tree are not text and a decode would corrupt them

      Parameters

      • path: string

      Returns Uint8Array

    • Parameters

      • path: string

      Returns string

    • Parameters

      • path: string
      • bytes: Uint8Array

      Returns void

    • Parameters

      • path: string
      • text: string

      Returns void