The file-lock Reference Manual

This is the file-lock Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:24:54 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 file-lock

File lock library on POSIX systems

Author

Arnold Noronha <>

License

MIT License

Version

0.0.1

Dependencies
  • cffi (system)., for feature (:not :lispworks)
  • easy-macros (system).
  • log4cl (system).
Source

file-lock.asd.

Child Component

file-lock.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 file-lock/file-lock.asd

Source

file-lock.asd.

Parent Component

file-lock (system).

ASDF Systems

file-lock.


3.1.2 file-lock/file-lock.lisp

Source

file-lock.asd.

Parent Component

file-lock (system).

Packages

util/file-lock.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 util/file-lock

Source

file-lock.lisp.

Nickname

file-lock

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-file-lock ((&rest fn-arg-values) &body macro-body)
Package

util/file-lock.

Source

file-lock.lisp.


5.1.2 Ordinary functions

Function: make-file-lock (&rest args &key file &allow-other-keys)
Package

util/file-lock.

Source

file-lock.lisp.


5.1.3 Generic functions

Generic Function: release-file-lock (self)
Package

util/file-lock.

Methods
Method: release-file-lock ((self noop-file-lock))
Source

file-lock.lisp.

Method: release-file-lock ((self file-lock))
Source

file-lock.lisp.


5.1.4 Standalone methods

Method: initialize-instance :after ((self file-lock) &key file sharedp acquire timeout)
Source

file-lock.lisp.


5.1.5 Classes

Class: file-lock
Package

util/file-lock.

Source

file-lock.lisp.

Direct methods
Direct slots
Slot: file
Initargs

:file

Readers

filename.

Writers

This slot is read-only.

Slot: stream
Package

common-lisp.

Readers

file-lock-stream.

Writers

(setf file-lock-stream).


5.2 Internals


5.2.1 Constants

Constant: lock-ex

Exclusive lock.

Package

util/file-lock.

Source

file-lock.lisp.

Constant: lock-nb

Don’t block when locking.

Package

util/file-lock.

Source

file-lock.lisp.

Constant: lock-sh

Shared lock.

Package

util/file-lock.

Source

file-lock.lisp.

Constant: lock-un

Unlock.

Package

util/file-lock.

Source

file-lock.lisp.


5.2.2 Ordinary functions

Function: call-with-file-lock (fn &key file)
Package

util/file-lock.

Source

file-lock.lisp.

Function: flock (fd operation)
Package

util/file-lock.

Source

file-lock.lisp.

Function: get-unix-error ()
Package

util/file-lock.

Source

file-lock.lisp.


5.2.3 Generic functions

Generic Function: acquire-file-lock (self &key sharedp timeout &allow-other-keys)
Package

util/file-lock.

Methods
Method: acquire-file-lock ((self noop-file-lock) &key &allow-other-keys)
Source

file-lock.lisp.

Method: acquire-file-lock ((self file-lock) &key sharedp timeout)
Source

file-lock.lisp.

Generic Function: ensure-stream (self)
Package

util/file-lock.

Methods
Method: ensure-stream ((self file-lock))
Source

file-lock.lisp.

Generic Function: file-handle (self)
Package

util/file-lock.

Methods
Method: file-handle ((self file-lock))
Source

file-lock.lisp.

Generic Reader: file-lock-stream (object)
Package

util/file-lock.

Methods
Reader Method: file-lock-stream ((file-lock file-lock))

automatically generated reader method

Source

file-lock.lisp.

Target Slot

stream.

Generic Writer: (setf file-lock-stream) (object)
Package

util/file-lock.

Methods
Writer Method: (setf file-lock-stream) ((file-lock file-lock))

automatically generated writer method

Source

file-lock.lisp.

Target Slot

stream.

Generic Reader: filename (object)
Package

util/file-lock.

Methods
Reader Method: filename ((file-lock file-lock))

automatically generated reader method

Source

file-lock.lisp.

Target Slot

file.


5.2.4 Conditions

Condition: could-not-get-lock
Package

util/file-lock.

Source

file-lock.lisp.

Direct superclasses

error.

Condition: lock-not-held
Package

util/file-lock.

Source

file-lock.lisp.

Direct superclasses

error.


5.2.5 Classes

Class: noop-file-lock
Package

util/file-lock.

Source

file-lock.lisp.

Direct methods
Direct slots
Slot: file
Initargs

:file


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   E   F   G   I   M   R   W  
Index Entry  Section

(
(setf file-lock-stream): Private generic functions
(setf file-lock-stream): Private generic functions

A
acquire-file-lock: Private generic functions
acquire-file-lock: Private generic functions
acquire-file-lock: Private generic functions

C
call-with-file-lock: Private ordinary functions

E
ensure-stream: Private generic functions
ensure-stream: Private generic functions

F
file-handle: Private generic functions
file-handle: Private generic functions
file-lock-stream: Private generic functions
file-lock-stream: Private generic functions
filename: Private generic functions
filename: Private generic functions
flock: Private ordinary functions
Function, call-with-file-lock: Private ordinary functions
Function, flock: Private ordinary functions
Function, get-unix-error: Private ordinary functions
Function, make-file-lock: Public ordinary functions

G
Generic Function, (setf file-lock-stream): Private generic functions
Generic Function, acquire-file-lock: Private generic functions
Generic Function, ensure-stream: Private generic functions
Generic Function, file-handle: Private generic functions
Generic Function, file-lock-stream: Private generic functions
Generic Function, filename: Private generic functions
Generic Function, release-file-lock: Public generic functions
get-unix-error: Private ordinary functions

I
initialize-instance: Public standalone methods

M
Macro, with-file-lock: Public macros
make-file-lock: Public ordinary functions
Method, (setf file-lock-stream): Private generic functions
Method, acquire-file-lock: Private generic functions
Method, acquire-file-lock: Private generic functions
Method, ensure-stream: Private generic functions
Method, file-handle: Private generic functions
Method, file-lock-stream: Private generic functions
Method, filename: Private generic functions
Method, initialize-instance: Public standalone methods
Method, release-file-lock: Public generic functions
Method, release-file-lock: Public generic functions

R
release-file-lock: Public generic functions
release-file-lock: Public generic functions
release-file-lock: Public generic functions

W
with-file-lock: Public macros