Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > LockFile > getLockFilePath

LockFile.getLockFilePath() method

Returns the path of the lockfile that will be created when a lock is successfully acquired.

Signature:

static getLockFilePath(resourceFolder: string, resourceName: string, pid?: number): string;

Parameters

ParameterTypeDescription
resourceFolderstringThe folder where the lock file will be created
resourceNamestringAn alphanumeric name that describes the resource being locked. This will become the filename of the temporary file created to manage the lock.
pidnumber(Optional) The PID for the current Node.js process (process.pid), which is used by the locking algorithm.

Returns:

string