Class DirCache<K, V>

A cache of directories. The key is the offset in the data and the value is the directory entries.

Type Parameters

Hierarchy

  • Map<K, V>
    • DirCache

Constructors

Methods

Constructors

  • Type Parameters

    Parameters

    • maxSize: number

      the max size of the cache before dumping old data

    Returns DirCache<K, V>

Methods

  • Parameters

    • key: K

      the offset position in the data

    Returns boolean

    • true if found
  • Parameters

    • key: K

      the offset position in the data

    Returns undefined | V

    • the directories entries if found
  • Parameters

    • key: K

      the offset position in the data

    • dir: V

      the directory entries

    Returns this

    this