Asynchronously append the given contents to this lock file.
It is unsafe to call appendFile()
multiple times on the same file without
waiting for the Promise
to be resolved (or rejected).
Optional
encoding: EncodingAsynchronously writes the given contents to this lock file, replacing any old contents.
It is unsafe to call writeFile()
multiple times on the same file without
waiting for the Promise
to be resolved (or rejected).
Optional
encoding: EncodingStatic
forceStatic
isChecks if the given file is locked.
Name of the file to check.
Lock file options.
Lock status, one of "unlocked"
"locked"
or "stale"
.
Static
lockAttempts to lock the given file. Throws [[LockFileError]] if file cannot be locked.
Name of the file to lock.
Lock file options.
A promise which resolves with [[LockFile]] instance on success.
Static
with
Synchronizes access to a shared file for multiple concurrent processes.