Skip to main content

method Deno.FsFile.prototype.tryLockSync

#FsFile.prototype.tryLockSync(exclusive?: boolean): boolean

Synchronously try to acquire an advisory file-system lock for the file. Returns true if the lock was acquired, false if the file is already locked.

Unlike Deno.FsFile.lockSync, this method will not block if the lock cannot be acquired.

Parameters #

#exclusive: boolean = false
optional

Return Type #

boolean

Did you find what you needed?

Privacy policy