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

Parameter

Type

Description

resourceFolder

string

The folder where the lock file will be created

resourceName

string

An alphanumeric name that describes the resource being locked. This will become the filename of the temporary file created to manage the lock.

pid

number

(Optional) The PID for the current Node.js process (process.pid), which is used by the locking algorithm.

Returns:

string