@ac-essentials/misc-util
    Preparing search index...

    Class LockFile

    A simple file-based lock mechanism.

    Creates a .lock file to indicate that a resource is locked. The lock is acquired by creating the lock file and released by deleting it. If the lock file already exists, it means the resource is locked by another process.

    Example usage:

    const lock = new LockFile("/path/to/resource");
    const release = await lock.acquire();
    try {
    // Do something with the locked resource
    } finally {
    await release();
    }

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    filePath: string

    Accessors

    Methods