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

    Function memoryFiles

    • A filesystem over a flat path map.

      Directory listings are derived from the keys, so a fixture declares files only and the tree falls out; a fixture that had to declare its directories too would drift from the files in it.

      IT HOLDS BYTES, not strings, and a seeded string is UTF-8 encoded on the way in. That is what nodeFiles does, so size() and readBytes().length agree here for the same reason they agree on a real disk. Storing the string and encoding on read would make a binary fixture -- a database, a pack -- read back as something other than what was written.

      Parameters

      • seed: Record<string, string> = {}

      Returns MemoryFiles