Vision Lens SDK
    Preparing search index...

    Class MemoryFileRepository

    Implements

    Index

    Constructors

    Methods

    • Ensure a directory exists (create recursively if needed).

      Parameters

      • dir: string

      Returns Promise<void>

    • Return true if the path exists.

      Parameters

      • filePath: string

      Returns Promise<boolean>

    • List all filenames (not paths) in a directory.

      Parameters

      • dir: string

      Returns Promise<string[]>

    • Test helper: read a seeded or written file as string.

      Parameters

      • filePath: string

      Returns string | undefined

    • Read and parse a JSON file. Throws if missing.

      Type Parameters

      • T

      Parameters

      • filePath: string

      Returns Promise<T>

    • Remove a file. No-op if missing.

      Parameters

      • filePath: string

      Returns Promise<void>

    • Test helper: seed a file into the in-memory store.

      Parameters

      • filePath: string
      • content: any

      Returns void

    • Write a binary file. Used for XLSX.

      Parameters

      • filePath: string
      • content: Buffer

      Returns Promise<void>

    • Atomically write a JSON value (tmp+rename).

      Parameters

      • filePath: string
      • value: unknown

      Returns Promise<void>

    • Atomically write a text file (tmp+rename).

      Parameters

      • filePath: string
      • content: string

      Returns Promise<void>