class FileLock
package digigun.sys.fs
Provides advisory file locking using flock() or LockFileEx().
Static methods
staticlock(path:String, exclusive:Bool = true, wait:Bool = true):FileLock
Acquires a lock on a file.
Parameters:
path | Path to the file. |
|---|---|
exclusive | True for exclusive (write) lock, false for shared (read) lock. |
wait | True to block until lock is acquired, false to fail immediately if locked. |
Returns:
A FileLock instance if successful, null otherwise.