Struct FileBasedLock

Implements file based locking that can help synchronize processes

struct FileBasedLock ;

Constructors

NameDescription
this (file_name, file_dir, create_dir) Creates a FileBasedLock object

Fields

NameTypeDescription
file_name string
file_path string

Methods

NameDescription
lockBlock () Attempts to lock the file and blocks until the lock is acquired
lockThrow () Attempts to lock the file and throws exception if unsuccessful
lockTry () Attempts to lock the file and return immediately
unlock () Unlocks the file