Class FileSystemLockingImpl

Use this backend service to help prevent race access to files on disk.

Implements

Constructors

Methods

  • Get exclusive access to a file for reading and/or writing.

    Type Parameters

    • T

    Parameters

    • lockPath: string

      The path to request exclusive access to.

    • transaction: ((lockPath) => T | Promise<T>)

      The job to do while having exclusive access.

        • (lockPath): T | Promise<T>
        • Parameters

          • lockPath: string

          Returns T | Promise<T>

    • Optional thisArg: unknown

      this argument used when calling transaction.

    Returns Promise<T>