The cl-inotify Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-inotify Reference Manual

This is the cl-inotify Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:24:55 2020 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

CL-INOTIFY - Binding to the Linux inotify(7) API.

Copyright (C) 2011-15 Olof-Joachim Frahm

Released under a Simplified BSD license.

Working, but unfinished.

Build Status

Uses CFFI, binary-types (from my Github or see CLiki) and trivial-utf-8. Doesn't require iolib, because I don't need most of the functionality, although it might add some implementation independence (patches which can be conditionally compiled are most welcome; in any case patches are always welcome). The tests require fiveam.

Similar packages are inotify and cl-fsnotify.

This document helps only with the aspects of this binding, so reading the man-page and other information on the inotify-facility may be needed. Reading the next sections and the docstrings of exported symbols should get you going, otherwise the source itself may also be of some value.

REPLSHOT

Macros make keeping track easier, so the following example is straightforward:

> (with-inotify (inotify T ("." :all-events))
>   (do-events (event inotify :blocking-p T)
>     (format T "~A~%" event)))
> =>
> #S(CL-INOTIFY::INOTIFY-EVENT :WD 1 :MASK (CREATE) :COOKIE 0 :NAME .zshist.LOCK)
> #S(CL-INOTIFY::INOTIFY-EVENT :WD 1 :MASK (OPEN) :COOKIE 0 :NAME .zshist)
> #S(CL-INOTIFY::INOTIFY-EVENT :WD 1 :MASK (MODIFY) :COOKIE 0 :NAME .zshist)
> #S(CL-INOTIFY::INOTIFY-EVENT :WD 1 :MASK (CLOSE-WRITE) :COOKIE 0 :NAME .zshist)
> #S(CL-INOTIFY::INOTIFY-EVENT :WD 1 :MASK (DELETE) :COOKIE 0 :NAME .zshist.LOCK)
> ...

(Tilde-expansion has to happen at another level, else I would've used that.)

The first parameter is (per convention) the symbol to which the queue is bound, the second is the parameter to MAKE-INOTIFY. The &REST list consists of parameter lists for the WATCH-function, which is called for every list before the &BODY is executed. We don't actually need to UNWATCH every watched path as closing the queue will also take care of that.

LOWER-LEVEL USAGE EXAMPLE

You don't have to use macros: all functionality is available in function form, although some care should be taken as currently no cleanup handler is registered for opened queues, or rather their file handles.

> (use-package '#:cl-inotify)
> (defvar *tmp*)
> (setf *tmp* (make-notify))
> (watch *tmp* "/var/tmp/" :all-events)
> (next-events *tmp*)
> (close-inotify *tmp*)

HOWTO

So this section deals in depth with the various bits which make the examples above tick.

After loading the library use MAKE-INOTIFY to create a new event queue. The NONBLOCKING argument sets the SB-POSIX:O-NONBLOCK bit on the stream so we don't block while reading. Nevertheless, EVENT-AVAILABLE-P works either way (by using CL:LISTEN, or a custom function which works directly on the file descriptor).

The result of MAKE-INOTIFY is used with WATCH and UNWATCH, the first being used to watch a file or directory, the second to stop watching it. The FLAGS parameter of WATCH is described in the notify(7) man-page; you can use a combination of the flags (as keywords) to create a suitable bitmask. The types INOTIFY-ADD/READ-FLAG, INOTIFY-READ-FLAG and INOTIFY-ADD-FLAG are also defined and can be examined.

For example, to watch for modified or closed files in a directory, call (WATCH inotify "foo/" '(:modify :close)).

The result of WATCH is a handle (currently a FIXNUM, but I wouldn't rely on that) which can be fed to UNWATCH and can be translated from events with EVENT-PATHNAME/FLAGS.

To finally get the events from the queue, use READ-EVENT (which blocks) or NEXT-EVENT (which doesn't block). EVENT-AVAILABLE-P does what it should do, NEXT-EVENTS retrieves all currently available events as a list and DO-EVENTS (nonblocking) iterates over available events.

The enhanced API registers all watched paths in a hashtable, so you can use PATHNAME-HANDLE/FLAGS to check if a pathname (exact match) is being watched and LIST-WATCHED to return all watched paths as a list. EVENT-PATHNAME/FLAGS may be used to get the pathname and flags for a read event.

UNWATCH has to be called with the path or the handle of the watched file or directory (a path will be looked up in the same table as with PATHNAME-HANDLE/FLAGS).

The raw API, which doesn't register watched paths, consists of READ-RAW-EVENT-FROM-STREAM, READ-EVENT-FROM-STREAM, WATCH-RAW and UNWATCH-RAW. They are just a thin wrapper around the C functions, but they're exported in case someone doesn't like the upper layers.

EVENT-BASED PROCESSING

In case you want to use epoll or select on the event queue you can access the file descriptor yourself and then use the normal functions afterwards. Currently no such functionality is integrated here, however the following sketch shows how something can be accomplished using iolib:

(with-unregistered-inotify (inotify T ("." :all-events))
  (flet ((inotify-input (&rest rest)
           (declare (ignore rest))
           (format T "~{~A~%~}" (next-events inotify))))
    (iolib:with-event-base (event-base)
      (iolib:set-io-handler event-base (inotify-fd inotify) :read #'inotify-input)
      (iolib:event-dispatch event-base))))

Note that we perform all inotify business only when something happens in that directory, so instead of doing nothing, we could actually do useful work, e.g. communicating with a process: This snippet was extracted from a function which uses behaviour to monitor a LaTeX process for written files to get the output file name without relying on heuristics about the generated filename. As it stands you have to split this into threads, or use IOLIB:EVENT-DISPATCH with a timeout while periodically checking the process status.

REFERENCE

Here follows a list of valid keywords for the INOTIFY-FLAG type:

The INOTIFY-EVENT structure has the slots WD, MASK, COOKIE and NAME (with default CONC-NAME: INOTIFY-EVENT-).

The INOTIFY-INSTANCE structure has the slots FD, STREAM and NONBLOCKING with CONC-NAME INOTIFY-.

The REGISTERED-INOTIFY-INSTANCE includes the previous structure and only adds the WATCHED slot under the same CONC-NAME.

TODO


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 cl-inotify

Author

Olof-Joachim Frahm <olof@macrolet.net>

License

Simplified BSD License

Description

Inotify binding.

Long Description

Binding to the Linux inotify(7) API.

Dependencies
Source

cl-inotify.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-inotify/src

Parent

cl-inotify (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

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


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-inotify.asd

Location

cl-inotify.asd

Systems

cl-inotify (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-inotify/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

cl-inotify


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-inotify/src/grovel.lisp

Parent

src (module)

Location

src/grovel.lisp


Previous: , Up: Lisp files   [Contents][Index]

4.1.4 cl-inotify/src/inotify.lisp

Parent

src (module)

Location

src/inotify.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 cl-inotify

Binding to the Linux inotify(7) API.

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: do-events (VAR INOTIFY &key BLOCKING-P) &body BODY

Loops BODY with VAR bound to the next events retrieved from INOTIFY. The macro uses NEXT-EVENT, so reading an event won’t block and the loop terminates if no events are available. If BLOCKING-P is set, the loop blocks if no events are available, otherwise it exits as soon as no events were encountered.

Package

cl-inotify

Source

inotify.lisp (file)

Macro: with-inotify (INOTIFY &optional NONBLOCKING &rest REST) &body BODY

Executes BODY with a newly created queue bound to INOTIFY if true. See MAKE-INOTIFY for more information about possible arguments.

The REST is a list of argument forms for the WATCH function, i.e. one or more forms (PATHNAME FLAGS &KEY (REPLACE-P T)).

Since the QUEUE is closed on unwinding, this macro doesn’t bother with UNWATCH calls on all WATCHed paths.

Package

cl-inotify

Source

inotify.lisp (file)

Macro: with-unregistered-inotify (INOTIFY &optional NONBLOCKING &rest REST) &body BODY

Like WITH-INOTIFY, but uses MAKE-UNREGISTERED-INOTIFY and WATCH-RAW instead. Useful if you need to monitor just a fixed set of paths.

Package

cl-inotify

Source

inotify.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: close-inotify INOTIFY

Closes the inotify event queue.

Package

cl-inotify

Source

inotify.lisp (file)

Function: event-available-p INOTIFY

Returns T if an event is available on the queue.

Package

cl-inotify

Source

inotify.lisp (file)

Function: event-pathname/flags INOTIFY EVENT &optional HANDLE

Returns two values PATHNAME and FLAGS for an EVENT which were used during registration. If HANDLE is specified EVENT is ignored.

Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-event-cookie INSTANCE
Function: (setf inotify-event-cookie) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-event-mask INSTANCE
Function: (setf inotify-event-mask) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-event-name INSTANCE
Function: (setf inotify-event-name) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-event-wd INSTANCE
Function: (setf inotify-event-wd) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-fd INSTANCE
Function: (setf inotify-fd) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-nonblocking INSTANCE
Function: (setf inotify-nonblocking) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-stream INSTANCE
Function: (setf inotify-stream) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: list-watched INOTIFY

Returns a LIST of all watched pathnames in no particular order.

Package

cl-inotify

Source

inotify.lisp (file)

Function: make-inotify &optional NONBLOCKING

Creates a new registered INOTIFY instance. In NONBLOCKING mode, the file descriptor is set to non-blocking mode. The resulting object has to be closed with CLOSE-INOTIFY.

Package

cl-inotify

Source

inotify.lisp (file)

Function: make-unregistered-inotify &optional NONBLOCKING

Creates a new unregistered INOTIFY instance.

Package

cl-inotify

Source

inotify.lisp (file)

Function: next-event INOTIFY

Reads an event from the queue. Returns NIL if none is available.

Package

cl-inotify

Source

inotify.lisp (file)

Function: next-events INOTIFY

Reads all available events from the queue. Returns a LIST of events.

Package

cl-inotify

Source

inotify.lisp (file)

Function: pathname-handle/flags INOTIFY PATHNAME

Returns a CONS cell with the values HANDLE and FLAGS if PATHNAME is being watched by INOTIFY, else NIL. The match is exact.

Package

cl-inotify

Source

inotify.lisp (file)

Function: read-event INOTIFY

Reads an event from the queue. Blocks if no event is available.

Package

cl-inotify

Source

inotify.lisp (file)

Function: read-event-from-stream STREAM

Reads a event from the inotify stream and converts bitmasks on reading.

Package

cl-inotify

Source

inotify.lisp (file)

Function: read-raw-event-from-stream STREAM

Reads a raw event from the inotify stream.

Package

cl-inotify

Source

inotify.lisp (file)

Function: unwatch INOTIFY &key PATHNAME EVENT HANDLE

Disables watching the path associated with the supplied HANDLE (which may be one from a given EVENT) or PATHNAME.

Package

cl-inotify

Source

inotify.lisp (file)

Function: unwatch-raw INOTIFY HANDLE

Stops watching the path associated with a HANDLE established by WATCH-RAW.

Package

cl-inotify

Source

inotify.lisp (file)

Function: watch INOTIFY PATHNAME FLAGS &key REPLACE-P

Adds PATHNAME (either pathname or string) to be watched and records the watched paths. FLAGS (a list of keywords) determines how exactly (see inotify(7) for detailed information). Returns a handle which can be used with UNWATCH and EVENT-PATHNAME/FLAGS. If REPLACE-P is set to T (default), the flags mask is replaced rather than OR-ed to the current mask (if it exists). The :MASK-ADD flag is therefore removed from the FLAGS argument.

Package

cl-inotify

Source

inotify.lisp (file)

Function: watch-raw INOTIFY PATHNAME FLAGS

Adds PATHNAME (either of type PATHNAME or STRING) to be watched. FLAGS determines how exactly (see inotify(7) for detailed information) and can be of type LIST, KEYWORD or a raw numerical value (which isn’t checked for validity though). Returns a handle which can be used with UNWATCH-RAW.

Package

cl-inotify

Source

inotify.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Types

Type: inotify-add-flag ()

Valid flags for the WATCH-RAW function.

Package

cl-inotify

Source

inotify.lisp (file)

Type: inotify-add/read-flag ()

Shared valid flags for the WATCH-RAW and READ-EVENT functions.

Package

cl-inotify

Source

inotify.lisp (file)

Type: inotify-read-flag ()

Valid flags which are returned from READ-EVENT.

Package

cl-inotify

Source

inotify.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Constants

Constant: in-access
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-all-events
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-attrib
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-cloexec
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-close
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-close-nowrite
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-close-write
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-create
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-delete
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-delete-self
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-dont-follow
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-ignored
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-isdir
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-mask-add
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-modify
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-move
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-move-self
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-moved-from
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-moved-to
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-nonblock
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-oneshot
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-onlydir
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-open
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-q-overflow
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file

Constant: in-unmount
Package

cl-inotify

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-inotify-20200427-git/src/grovel.processed-grovel-file


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: copy-inotify-event INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: copy-inotify-instance INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: copy-registered-inotify-instance INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: ensure-list ARG
Package

cl-inotify

Source

inotify.lisp (file)

Function: init-endian ()

Initialises the endianess for the BINARY-TYPES library. Is automatically called when the library is loaded.

Package

cl-inotify

Source

inotify.lisp (file)

Function: init-unregistered-inotify INOTIFY &optional NONBLOCKING

Creates a new inotify event queue. If NONBLOCKING is set (default), the file descriptor is set to non-blocking I/O.

Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-add-watch FD PATHNAME MASK

Watches a path on an event queue.

Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-event-p OBJECT
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-handles INSTANCE
Function: (setf inotify-handles) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-init ()

Initialises a new inotify event queue.

Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-init1 FLAGS

Initialises a new inotify event queue and passes some flags along.

Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-instance-p OBJECT
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-pathnames INSTANCE
Function: (setf inotify-pathnames) VALUE INSTANCE
Package

cl-inotify

Source

inotify.lisp (file)

Function: inotify-rm-watch FD WD

Removes a watched path from an event queue.

Package

cl-inotify

Source

inotify.lisp (file)

Function: make-inotify-event &key (WD WD) (MASK MASK) (COOKIE COOKIE) (NAME NAME)
Package

cl-inotify

Source

inotify.lisp (file)

Function: make-inotify-instance ()
Package

cl-inotify

Source

inotify.lisp (file)

Function: make-registered-inotify-instance ()
Package

cl-inotify

Source

inotify.lisp (file)

Function: read-new-value &optional STREAM

READs a value from the STREAM and returns it (wrapped in a list).

Package

cl-inotify

Source

inotify.lisp (file)

Function: registered-inotify-instance-p OBJECT
Package

cl-inotify

Source

inotify.lisp (file)

Function: sane-user-flags INOTIFY PATHNAME FLAGS &key REPLACE-P
Package

cl-inotify

Source

inotify.lisp (file)

Function: set-nonblocking FD NONBLOCKING

Enables or disables NONBLOCKING mode on a file descriptor FD.

Package

cl-inotify

Source

inotify.lisp (file)

Function: translate-keyword-flags FLAGS
Package

cl-inotify

Source

inotify.lisp (file)

Function: unix-eagain-p FD

Returns T on a file descriptor if trying to read raised an EAGAIN error.

Package

cl-inotify

Source

inotify.lisp (file)

Function: valid-watch-flag-list-p LIST
Package

cl-inotify

Source

inotify.lisp (file)

Function: valid-watch-flag-p X
Package

cl-inotify

Source

inotify.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Structures

Structure: inotify-event ()

An inotify native event structure.
WD is the watch/file descriptor,
MASK is the (parsed) combination of events,
COOKIE is a unique integer which connects related events,
NAME optionally identifies a file relative to a watched directory.

Package

cl-inotify

Source

inotify.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: wd
Initform

0

Readers

inotify-event-wd (function)

Writers

(setf inotify-event-wd) (function)

Slot: mask
Initform

0

Readers

inotify-event-mask (function)

Writers

(setf inotify-event-mask) (function)

Initform

0

Readers

inotify-event-cookie (function)

Writers

(setf inotify-event-cookie) (function)

Slot: name
Readers

inotify-event-name (function)

Writers

(setf inotify-event-name) (function)

Structure: inotify-instance ()

Contains the stream and file descriptor for a inotify instance.

Package

cl-inotify

Source

inotify.lisp (file)

Direct superclasses

structure-object (structure)

Direct subclasses

registered-inotify-instance (structure)

Direct slots
Slot: fd
Readers

inotify-fd (function)

Writers

(setf inotify-fd) (function)

Slot: stream
Readers

inotify-stream (function)

Writers

(setf inotify-stream) (function)

Slot: nonblocking
Readers

inotify-nonblocking (function)

Writers

(setf inotify-nonblocking) (function)

Structure: registered-inotify-instance ()

Additionally to the information in INOTIFY-INSTANCE, records watched paths in a dictionary.

Package

cl-inotify

Source

inotify.lisp (file)

Direct superclasses

inotify-instance (structure)

Direct slots
Slot: pathnames
Readers

inotify-pathnames (function)

Writers

(setf inotify-pathnames) (function)

Slot: handles
Readers

inotify-handles (function)

Writers

(setf inotify-handles) (function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Types

Type: int ()
Package

cl-inotify

Source

inotify.lisp (file)

Type: watch-flag-list ()

Valid flags argument for the WATCH function, a list of keywords from INOTIFY-ADD-FLAG. Basically only :MASK-ADD and :ONESHOT are removed. The :MASK-ADD behaviour is replicated with the REPLACE-P argument; the :ONESHOT behaviour doesn’t play well with the WATCH function design (and thus should be used only with WATCH-RAW).

Package

cl-inotify

Source

inotify.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-inotify.asd: The cl-inotify․asd file
cl-inotify/src: The cl-inotify/src module
cl-inotify/src/grovel.lisp: The cl-inotify/src/grovel․lisp file
cl-inotify/src/inotify.lisp: The cl-inotify/src/inotify․lisp file
cl-inotify/src/package.lisp: The cl-inotify/src/package․lisp file

F
File, Lisp, cl-inotify.asd: The cl-inotify․asd file
File, Lisp, cl-inotify/src/grovel.lisp: The cl-inotify/src/grovel․lisp file
File, Lisp, cl-inotify/src/inotify.lisp: The cl-inotify/src/inotify․lisp file
File, Lisp, cl-inotify/src/package.lisp: The cl-inotify/src/package․lisp file

L
Lisp File, cl-inotify.asd: The cl-inotify․asd file
Lisp File, cl-inotify/src/grovel.lisp: The cl-inotify/src/grovel․lisp file
Lisp File, cl-inotify/src/inotify.lisp: The cl-inotify/src/inotify․lisp file
Lisp File, cl-inotify/src/package.lisp: The cl-inotify/src/package․lisp file

M
Module, cl-inotify/src: The cl-inotify/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   D   E   F   I   L   M   N   P   R   S   T   U   V   W  
Index Entry  Section

(
(setf inotify-event-cookie): Exported functions
(setf inotify-event-mask): Exported functions
(setf inotify-event-name): Exported functions
(setf inotify-event-wd): Exported functions
(setf inotify-fd): Exported functions
(setf inotify-handles): Internal functions
(setf inotify-nonblocking): Exported functions
(setf inotify-pathnames): Internal functions
(setf inotify-stream): Exported functions

C
close-inotify: Exported functions
copy-inotify-event: Internal functions
copy-inotify-instance: Internal functions
copy-registered-inotify-instance: Internal functions

D
do-events: Exported macros

E
ensure-list: Internal functions
event-available-p: Exported functions
event-pathname/flags: Exported functions

F
Function, (setf inotify-event-cookie): Exported functions
Function, (setf inotify-event-mask): Exported functions
Function, (setf inotify-event-name): Exported functions
Function, (setf inotify-event-wd): Exported functions
Function, (setf inotify-fd): Exported functions
Function, (setf inotify-handles): Internal functions
Function, (setf inotify-nonblocking): Exported functions
Function, (setf inotify-pathnames): Internal functions
Function, (setf inotify-stream): Exported functions
Function, close-inotify: Exported functions
Function, copy-inotify-event: Internal functions
Function, copy-inotify-instance: Internal functions
Function, copy-registered-inotify-instance: Internal functions
Function, ensure-list: Internal functions
Function, event-available-p: Exported functions
Function, event-pathname/flags: Exported functions
Function, init-endian: Internal functions
Function, init-unregistered-inotify: Internal functions
Function, inotify-add-watch: Internal functions
Function, inotify-event-cookie: Exported functions
Function, inotify-event-mask: Exported functions
Function, inotify-event-name: Exported functions
Function, inotify-event-p: Internal functions
Function, inotify-event-wd: Exported functions
Function, inotify-fd: Exported functions
Function, inotify-handles: Internal functions
Function, inotify-init: Internal functions
Function, inotify-init1: Internal functions
Function, inotify-instance-p: Internal functions
Function, inotify-nonblocking: Exported functions
Function, inotify-pathnames: Internal functions
Function, inotify-rm-watch: Internal functions
Function, inotify-stream: Exported functions
Function, list-watched: Exported functions
Function, make-inotify: Exported functions
Function, make-inotify-event: Internal functions
Function, make-inotify-instance: Internal functions
Function, make-registered-inotify-instance: Internal functions
Function, make-unregistered-inotify: Exported functions
Function, next-event: Exported functions
Function, next-events: Exported functions
Function, pathname-handle/flags: Exported functions
Function, read-event: Exported functions
Function, read-event-from-stream: Exported functions
Function, read-new-value: Internal functions
Function, read-raw-event-from-stream: Exported functions
Function, registered-inotify-instance-p: Internal functions
Function, sane-user-flags: Internal functions
Function, set-nonblocking: Internal functions
Function, translate-keyword-flags: Internal functions
Function, unix-eagain-p: Internal functions
Function, unwatch: Exported functions
Function, unwatch-raw: Exported functions
Function, valid-watch-flag-list-p: Internal functions
Function, valid-watch-flag-p: Internal functions
Function, watch: Exported functions
Function, watch-raw: Exported functions

I
init-endian: Internal functions
init-unregistered-inotify: Internal functions
inotify-add-watch: Internal functions
inotify-event-cookie: Exported functions
inotify-event-mask: Exported functions
inotify-event-name: Exported functions
inotify-event-p: Internal functions
inotify-event-wd: Exported functions
inotify-fd: Exported functions
inotify-handles: Internal functions
inotify-init: Internal functions
inotify-init1: Internal functions
inotify-instance-p: Internal functions
inotify-nonblocking: Exported functions
inotify-pathnames: Internal functions
inotify-rm-watch: Internal functions
inotify-stream: Exported functions

L
list-watched: Exported functions

M
Macro, do-events: Exported macros
Macro, with-inotify: Exported macros
Macro, with-unregistered-inotify: Exported macros
make-inotify: Exported functions
make-inotify-event: Internal functions
make-inotify-instance: Internal functions
make-registered-inotify-instance: Internal functions
make-unregistered-inotify: Exported functions

N
next-event: Exported functions
next-events: Exported functions

P
pathname-handle/flags: Exported functions

R
read-event: Exported functions
read-event-from-stream: Exported functions
read-new-value: Internal functions
read-raw-event-from-stream: Exported functions
registered-inotify-instance-p: Internal functions

S
sane-user-flags: Internal functions
set-nonblocking: Internal functions

T
translate-keyword-flags: Internal functions

U
unix-eagain-p: Internal functions
unwatch: Exported functions
unwatch-raw: Exported functions

V
valid-watch-flag-list-p: Internal functions
valid-watch-flag-p: Internal functions

W
watch: Exported functions
watch-raw: Exported functions
with-inotify: Exported macros
with-unregistered-inotify: Exported macros

Jump to:   (  
C   D   E   F   I   L   M   N   P   R   S   T   U   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   C   F   H   I   M   N   P   S   W  
Index Entry  Section

C
Constant, in-access: Internal constants
Constant, in-all-events: Internal constants
Constant, in-attrib: Internal constants
Constant, in-cloexec: Internal constants
Constant, in-close: Internal constants
Constant, in-close-nowrite: Internal constants
Constant, in-close-write: Internal constants
Constant, in-create: Internal constants
Constant, in-delete: Internal constants
Constant, in-delete-self: Internal constants
Constant, in-dont-follow: Internal constants
Constant, in-ignored: Internal constants
Constant, in-isdir: Internal constants
Constant, in-mask-add: Internal constants
Constant, in-modify: Internal constants
Constant, in-move: Internal constants
Constant, in-move-self: Internal constants
Constant, in-moved-from: Internal constants
Constant, in-moved-to: Internal constants
Constant, in-nonblock: Internal constants
Constant, in-oneshot: Internal constants
Constant, in-onlydir: Internal constants
Constant, in-open: Internal constants
Constant, in-q-overflow: Internal constants
Constant, in-unmount: Internal constants
cookie: Internal structures

F
fd: Internal structures

H
handles: Internal structures

I
in-access: Internal constants
in-all-events: Internal constants
in-attrib: Internal constants
in-cloexec: Internal constants
in-close: Internal constants
in-close-nowrite: Internal constants
in-close-write: Internal constants
in-create: Internal constants
in-delete: Internal constants
in-delete-self: Internal constants
in-dont-follow: Internal constants
in-ignored: Internal constants
in-isdir: Internal constants
in-mask-add: Internal constants
in-modify: Internal constants
in-move: Internal constants
in-move-self: Internal constants
in-moved-from: Internal constants
in-moved-to: Internal constants
in-nonblock: Internal constants
in-oneshot: Internal constants
in-onlydir: Internal constants
in-open: Internal constants
in-q-overflow: Internal constants
in-unmount: Internal constants

M
mask: Internal structures

N
name: Internal structures
nonblocking: Internal structures

P
pathnames: Internal structures

S
Slot, cookie: Internal structures
Slot, fd: Internal structures
Slot, handles: Internal structures
Slot, mask: Internal structures
Slot, name: Internal structures
Slot, nonblocking: Internal structures
Slot, pathnames: Internal structures
Slot, stream: Internal structures
Slot, wd: Internal structures
stream: Internal structures

W
wd: Internal structures

Jump to:   C   F   H   I   M   N   P   S   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   I   P   R   S   T   W  
Index Entry  Section

C
cl-inotify: The cl-inotify system
cl-inotify: The cl-inotify package

I
inotify-add-flag: Exported types
inotify-add/read-flag: Exported types
inotify-event: Internal structures
inotify-instance: Internal structures
inotify-read-flag: Exported types
int: Internal types

P
Package, cl-inotify: The cl-inotify package

R
registered-inotify-instance: Internal structures

S
Structure, inotify-event: Internal structures
Structure, inotify-instance: Internal structures
Structure, registered-inotify-instance: Internal structures
System, cl-inotify: The cl-inotify system

T
Type, inotify-add-flag: Exported types
Type, inotify-add/read-flag: Exported types
Type, inotify-read-flag: Exported types
Type, int: Internal types
Type, watch-flag-list: Internal types

W
watch-flag-list: Internal types

Jump to:   C   I   P   R   S   T   W