The cl-fam Reference Manual

This is the cl-fam Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 03:55:57 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-fam

Wraps libfam (File access monitor) API. Needs gamin-devel or fam-devel package

Author

Max Mikhanosha <>

License

Apache

Version

1.0

Defsystem Dependency

cffi-grovel (system).

Dependencies
  • cffi (system).
  • cffi-grovel (system).
  • trivial-garbage (system).
Source

cl-fam.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 cl-fam/cl-fam.asd

Source

cl-fam.asd.

Parent Component

cl-fam (system).

ASDF Systems

cl-fam.


3.1.2 cl-fam/package.lisp

Source

cl-fam.asd.

Parent Component

cl-fam (system).

Packages

cl-fam.


3.1.3 cl-fam/fam-grovel.lisp

Dependency

package.lisp (file).

Source

cl-fam.asd.

Parent Component

cl-fam (system).


3.1.4 cl-fam/cl-fam.lisp

Dependency

fam-grovel.lisp (file).

Source

cl-fam.asd.

Parent Component

cl-fam (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-fam

Source

package.lisp.

Use List
  • cffi.
  • common-lisp.
  • trivial-garbage.
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 Special variables

Special Variable: *fam*

Current FAM connection

Package

cl-fam.

Source

cl-fam.lisp.


5.1.2 Ordinary functions

Function: fam-cancel-monitor (req)

Cancel monitoring request.

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-close (&optional conn)

Close the FAM connection

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-fd (&optional conn)

Return FAM file handle

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-init (&optional app-name)

Open default FAM connection if its not already opened, same as (FAM-OPEN app-name T)

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-monitor-directory (filename &optional conn force-dup)

Monitor directory for changes. Returns FAM-DIRECTORY-REQUEST object, which can be used to cancel or suspend the request. The same request object will be returned as a slot of FAM-NEXT-EVENT.

In case the directory is already being monitored, return the existing request rather then starting a new one, unless FORCE-DUP is also specified.

The second returned value will be T if new request was created

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-monitor-file (filename &optional conn force-dup)

Monitor file for changes. Returns FAM-FILE-REQUEST object, which can be used to cancel or suspend the request. The same request object will be returned as a slot of FAM-NEXT-EVENT.

In case the directory is already being monitored, return the existing request rather then starting a new one, unless FORCE-DUP is also specified.

The second returned value will be T if new request was created

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-next-event (&optional use-values conn)

Return queued FAM event from the specified connection, if no events are pending will wait for one. By default the event is returned as an instance of FAM-EVENT class.

The FAM-CODE is translated into the keyword,

With USE-VALUES flag returns event code, filename and FAM-REQUEST object as three values.

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-open (&optional app-name reuse)

Optionally open new FAM connection and return it.

With REUSE flag return default connection if its open, or create a new connection and make it default. Default connection is stored in *FAM* special variable.

Without REUSE flag, unconditionally create new connection, and return it without storing it in *FAM*.

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-open-p (&optional conn)

Return T if connection is open

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-pending-p (&optional conn)

Return number of events pending on FAM connection or NIL if none are.

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-requests (&optional conn)

Return all the active requests for the connection

Package

cl-fam.

Source

cl-fam.lisp.


5.1.3 Generic functions

Generic Reader: fam-code (object)
Package

cl-fam.

Methods
Reader Method: fam-code ((fam-event fam-event))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

code.

Generic Reader: fam-connection (object)
Package

cl-fam.

Methods
Reader Method: fam-connection ((fam-event fam-event))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

connection.

Reader Method: fam-connection ((fam-request fam-request))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

connection.

Generic Reader: fam-filename (object)
Package

cl-fam.

Methods
Reader Method: fam-filename ((fam-event fam-event))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

filename.

Reader Method: fam-filename ((fam-request fam-request))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

filename.

Generic Reader: fam-hostname (object)
Package

cl-fam.

Methods
Reader Method: fam-hostname ((fam-event fam-event))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

hostname.

Generic Reader: fam-request (object)
Package

cl-fam.

Methods
Reader Method: fam-request ((fam-event fam-event))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

request.

Generic Reader: fam-request-number (object)
Package

cl-fam.

Methods
Reader Method: fam-request-number ((fam-request fam-request))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

request-number.

Generic Reader: fam-status (object)
Package

cl-fam.

Methods
Reader Method: fam-status ((fam-request fam-request))

automatically generated reader method

Source

cl-fam.lisp.

Target Slot

status.


5.1.4 Classes

Class: fam-connection

Stores information about FAM connection. If garbage collected then C level FAM connection will be automatically closed

Package

cl-fam.

Source

cl-fam.lisp.

Direct slots
Slot: %connection
Type

cffi-sys:foreign-pointer

Initargs

:connection

Slot: requests
Initform

(make-hash-table)

Slot: fd
Type

integer

Initargs

:fd

Slot: %open-flag
Initform

(list t)

Class: fam-request

Base class for FAM request

Package

cl-fam.

Source

cl-fam.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: request-number
Initargs

:request-number

Readers

fam-request-number.

Writers

This slot is read-only.

Slot: filename
Initargs

:filename

Readers

fam-filename.

Writers

This slot is read-only.

Slot: connection
Type

cl-fam:fam-connection

Initargs

:connection

Readers

fam-connection.

Writers

This slot is read-only.

Slot: status
Readers

fam-status.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Symbol macros

Symbol Macro: %fam-errno
Package

cl-fam.

Source

cl-fam.lisp.


5.2.2 Ordinary functions

Function: %fam-cancel-monitor (conn req)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-close (conn)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-monitor-directory (conn filename req userdata)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-monitor-file (conn filename req userdata)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-next-event (conn fa)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-open-2 (conn app-name)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-pending (conn)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-resume-monitor (conn req)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %fam-suspend-monitor (conn req)
Package

cl-fam.

Source

cl-fam.lisp.

Function: %var-accessor-%fam-errno ()
Package

cl-fam.

Source

cl-fam.lisp.

Function: (setf %var-accessor-%fam-errno) ()
Package

cl-fam.

Source

cl-fam.lisp.

Function: check-connection (conn)

Throw error unless connection is non-NIL and open

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-monitor-any (kind filename &optional conn force-dup)

Common code for FAM-MONITOR-DIRECTORY and FAM-MONITOR-FILE

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-resume-monitor (req)

Resume monitoring request.

Package

cl-fam.

Source

cl-fam.lisp.

Function: fam-suspend-monitor (req)

Suspend monitoring request.

Package

cl-fam.

Source

cl-fam.lisp.

Function: translate-fam-code (code)

Return FAM keyword for code

Package

cl-fam.

Source

cl-fam.lisp.


5.2.3 Classes

Class: fam-directory-request

FAM request to monitor a directory

Package

cl-fam.

Source

cl-fam.lisp.

Direct superclasses

fam-request.

Class: fam-event

Contains information about FAM event, is returned by FAM-NEXT-EVENT

Package

cl-fam.

Source

cl-fam.lisp.

Direct methods
Direct slots
Slot: hostname
Initargs

:hostname

Readers

fam-hostname.

Writers

This slot is read-only.

Slot: filename
Initargs

:filename

Readers

fam-filename.

Writers

This slot is read-only.

Slot: code
Initargs

:code

Readers

fam-code.

Writers

This slot is read-only.

Slot: request
Type

cl-fam:fam-request

Initargs

:request

Readers

fam-request.

Writers

This slot is read-only.

Slot: connection
Type

cl-fam:fam-connection

Initargs

:connection

Readers

fam-connection.

Writers

This slot is read-only.

Class: fam-file-request

FAM request to monitor a file

Package

cl-fam.

Source

cl-fam.lisp.

Direct superclasses

fam-request.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   F   G   M   T  
Index Entry  Section

%
%fam-cancel-monitor: Private ordinary functions
%fam-close: Private ordinary functions
%fam-monitor-directory: Private ordinary functions
%fam-monitor-file: Private ordinary functions
%fam-next-event: Private ordinary functions
%fam-open-2: Private ordinary functions
%fam-pending: Private ordinary functions
%fam-resume-monitor: Private ordinary functions
%fam-suspend-monitor: Private ordinary functions
%var-accessor-%fam-errno: Private ordinary functions

(
(setf %var-accessor-%fam-errno): Private ordinary functions

C
check-connection: Private ordinary functions

F
fam-cancel-monitor: Public ordinary functions
fam-close: Public ordinary functions
fam-code: Public generic functions
fam-code: Public generic functions
fam-connection: Public generic functions
fam-connection: Public generic functions
fam-connection: Public generic functions
fam-fd: Public ordinary functions
fam-filename: Public generic functions
fam-filename: Public generic functions
fam-filename: Public generic functions
fam-hostname: Public generic functions
fam-hostname: Public generic functions
fam-init: Public ordinary functions
fam-monitor-any: Private ordinary functions
fam-monitor-directory: Public ordinary functions
fam-monitor-file: Public ordinary functions
fam-next-event: Public ordinary functions
fam-open: Public ordinary functions
fam-open-p: Public ordinary functions
fam-pending-p: Public ordinary functions
fam-request: Public generic functions
fam-request: Public generic functions
fam-request-number: Public generic functions
fam-request-number: Public generic functions
fam-requests: Public ordinary functions
fam-resume-monitor: Private ordinary functions
fam-status: Public generic functions
fam-status: Public generic functions
fam-suspend-monitor: Private ordinary functions
Function, %fam-cancel-monitor: Private ordinary functions
Function, %fam-close: Private ordinary functions
Function, %fam-monitor-directory: Private ordinary functions
Function, %fam-monitor-file: Private ordinary functions
Function, %fam-next-event: Private ordinary functions
Function, %fam-open-2: Private ordinary functions
Function, %fam-pending: Private ordinary functions
Function, %fam-resume-monitor: Private ordinary functions
Function, %fam-suspend-monitor: Private ordinary functions
Function, %var-accessor-%fam-errno: Private ordinary functions
Function, (setf %var-accessor-%fam-errno): Private ordinary functions
Function, check-connection: Private ordinary functions
Function, fam-cancel-monitor: Public ordinary functions
Function, fam-close: Public ordinary functions
Function, fam-fd: Public ordinary functions
Function, fam-init: Public ordinary functions
Function, fam-monitor-any: Private ordinary functions
Function, fam-monitor-directory: Public ordinary functions
Function, fam-monitor-file: Public ordinary functions
Function, fam-next-event: Public ordinary functions
Function, fam-open: Public ordinary functions
Function, fam-open-p: Public ordinary functions
Function, fam-pending-p: Public ordinary functions
Function, fam-requests: Public ordinary functions
Function, fam-resume-monitor: Private ordinary functions
Function, fam-suspend-monitor: Private ordinary functions
Function, translate-fam-code: Private ordinary functions

G
Generic Function, fam-code: Public generic functions
Generic Function, fam-connection: Public generic functions
Generic Function, fam-filename: Public generic functions
Generic Function, fam-hostname: Public generic functions
Generic Function, fam-request: Public generic functions
Generic Function, fam-request-number: Public generic functions
Generic Function, fam-status: Public generic functions

M
Method, fam-code: Public generic functions
Method, fam-connection: Public generic functions
Method, fam-connection: Public generic functions
Method, fam-filename: Public generic functions
Method, fam-filename: Public generic functions
Method, fam-hostname: Public generic functions
Method, fam-request: Public generic functions
Method, fam-request-number: Public generic functions
Method, fam-status: Public generic functions

T
translate-fam-code: Private ordinary functions