Using this module file locking via fcntl(2) can be done (obviously, this restricts the use of the module to systems that have a fcntl(2) system call). Before a file (or parts of a file) can be locked, an object simulating a flock structure, containing information in a binary format to be passed to fcntl(2) for locking requests, must be created and its properties set. Afterwards, by calling the lock() method a lock can be set and removed or it can be determined if and which process currently holds the lock.