File locks
Author(s): José Manuel Gómez Pérez, Daniel Cabeza, Manuel Carro.This module implements file locks: the ability to lock a file so that other processes cannot access it until the file is unlocked.
NOT IMPLEMENTED. Consider locking in open/3.
Usage and interface
- Library usage:
:- use_module(library(file_locks)). - Exports:
- Predicates:
lock_file/3, unlock_file/2.
- Predicates:
- Imports:
- Packages:
prelude, nonpure, condcomp, assertions.
- Packages:
Documentation on exports
PREDICATE
Usage:lock_file(File,LockType,Result)
Tries to lock File with LockType and returns the result (either true or false) in Result.
- Call and exit should be compatible with:
(basic_props:atm/1)File is an atom.
(basic_props:atm/1)LockType is an atom.
(basic_props:atm/1)Result is an atom.
PREDICATE
Usage:unlock_file(File,Result)
Tries to unlock File the result (either true or false) in Result.
- Call and exit should be compatible with:
(basic_props:atm/1)File is an atom.
(basic_props:atm/1)Result is an atom.
Known bugs and planned improvements
- file locks are not currently implemented.