Function lock

  • Creates a cross-process lock for the given file, for the actual process.

    Note, that it will be only a soft-lock, the file will be locked for other instances of cross-process-lock, or processes using the same API for locking.

    Parameters

    • file: string

      The path of the file to lock.

    • options: LockOptions = {}

      The lock options/timeout.

    Returns Promise<UnlockFunction>

    The function to unlock the file.

Generated using TypeDoc