Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the file-notify Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 04:32:23 2022 GMT+0.
Next: Systems, Previous: The file-notify Reference Manual, Up: The file-notify Reference Manual [Contents][Index]
## About File-Notify This is a small OS portability library to get notifications for file access and changes. ## How To For the purpose of this tutorial we will assume ``org.shirakumo.file-notify`` has the nickname ``notify``. Before we can even begin, we need to add a file that we want to watch. :: common lisp (notify:watch "~/quicklisp/") :: Watching a directory will report all the events happening within. We can listen for them like this: :: common lisp (notify:with-events (file change :timeout T) (print (list file change))) :: Adding, removing, or changing a file within ``~/quicklisp/`` should now show a corresponding event at the REPL. If we no longer care about a file, it can also be ``unwatch``ed again. For more detailed information on the behaviour and capabilities, please refer to the individual functions. ## Supported Platforms The following platforms are supported: - Linux (inotify) - Windows - macOS (fsevent)
Next: Files, Previous: Introduction, Up: The file-notify Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Access to file change and access notification.
Nicolas Hafner <shinmera@tymoon.eu>
Nicolas Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/file-notify.git)
zlib
1.0.0
trivial-features (system).
Next: Packages, Previous: Systems, Up: The file-notify Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: file-notify/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
file-notify (system).
Next: file-notify/protocol.lisp, Previous: file-notify/file-notify.asd, Up: Lisp [Contents][Index]
file-notify (system).
Next: file-notify/inotify.lisp, Previous: file-notify/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
file-notify (system).
Next: file-notify/windows.lisp, Previous: file-notify/protocol.lisp, Up: Lisp [Contents][Index]
:linux
protocol.lisp (file).
file-notify (system).
Next: file-notify/fsevent.lisp, Previous: file-notify/inotify.lisp, Up: Lisp [Contents][Index]
:windows
file-notify (system).
Next: file-notify/documentation.lisp, Previous: file-notify/windows.lisp, Up: Lisp [Contents][Index]
:darwin
file-notify (system).
Previous: file-notify/fsevent.lisp, Up: Lisp [Contents][Index]
file-notify (system).
Next: Definitions, Previous: Files, Up: The file-notify Reference Manual [Contents][Index]
Packages are listed by definition order.
common-lisp.
Next: Indexes, Previous: Packages, Up: The file-notify Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Shorthand macro to process file change events.
See PROCESS-EVENTS
Next: Conditions, Previous: Macros, Up: Public Interface [Contents][Index]
Initialises the library for use.
You should call this function before anything else. It is safe to call
this function an arbitrary number of times, initialisation will only
occur once.
See SHUTDOWN
Returns the list of files the user passed to WATCH.
See WATCH
Processes available file change events.
FUNCTION is called with two arguments – the path of the file changed,
and the type of change event that occurred. The function may be called
multiple times.
TIMEOUT may be either T, NIL, or a real in [0, infty[.
When T, events will be continuously and indefinitely received. When
NIL, events will only be processed if immediately available. When a
real, the function will wait up to at most that number of seconds to
receive events.
The events received may be of types that were not explicitly requested
in the WATCH command, and for files that were not explicitly
watched. It is up to you to only look at the files and event types you
care about.
The TYPE passed to the function may be one of the following:
:ACCESS — The file was accessed somehow.
:ATTRIBUTE — The file’s attributes were changed.
:CLOSE-NOWRITE — The file was closed without writing.
:CLOSE-WRITE — The file was closed and written to.
:CREATE — The file was created.
:DELETE — The file was deleted.
:MODIFY — The file was modified somehow.
:MOVE — The file was moved.
:MOVED-FROM — A file was moved and this is the old name.
:MOVED-TO — A file was moved and this is the new name.
:OPEN — The file was opened.
Note: on MacOS the timeout parameter is almost guaranteed to be useless.
See WATCH
See UNWATCH
See WITH-EVENTS
See NORMALIZE-EVENT
Cleans up and shuts down the library.
All active watches will be cleared after this call.
After calling this you should not call any other library functions
unless you also call INIT again beforehand.
See INIT
Removes one or more files from the watch list.
FILE/S may either be a single pathname, or a list of pathnames for
files to be unwatched. If a given pathname was not watched, it is
ignored.
Note that, depending on other files being watched, you may still receive events for a file even after you’ve explicitly unwatched it.
See WATCH
See LIST-WATCHED
Adds one or more files to the watch list.
FILE/S may either be a single pathname, or a list of pathnames for
files to be watched. If a given file does not exist or is not
accessible, an error may be signalled.
EVENTS should be T or a list of events to watch. Supported event types
are:
:ACCESS — [LINUX] The file was accessed.
:ALL — [ALL] All available events are watched.
:ATTRIBUTE — [ALL] The file attributes changed.
:CLOSE — [LINUX] A file was closed.
:CLOSE-NOWRITE — [LINUX] A file was closed without writing.
:CLOSE-WRITE — [LINUX] A file was closed after writing.
:CREATE — [ALL] A file was created.
:DELETE — [ALL] A file was deleted.
:DELETE-SELF — [LINUX] The file was deleted.
:MODIFY — [ALL] The file was modified.
:MOVE — [ALL] A move or rename occurred.
:MOVE-SELF — [LINUX] The file was moved.
:MOVED-FROM — [LINUX] A file was moved from elsewhere.
:MOVED-TO — [LINUX] A file was moved elsewhere.
:OPEN — [LINUX] The file was opened.
:RENAME-FILE — [WINDOWS] A file was renamed, created, or deleted.
:RENAME-DIRECTORY — [WINDOWS] A directory was renamed, created, or deleted.
:SECURITY — [WINDOWS] A security descriptor changed
:SIZE — [WINDOWS] The size of the file changed
It is safe to call WATCH on the same file multiple times. Subsequent
watches will be ignored, and the watch will only happen once.
When a directory is watched, events for files contained within the
directory (subject to the above event filters) will be watched.
Note that it is not guaranteed that the filename you passed will
actually be watched. The underlying system may not accurately support
the capabilities you asked and may upgrade the events watched or even
the files being watched.
This will call INIT for you.
See UNWATCH
See LIST-WATCHED
See PROCESS-EVENTS
See INIT
Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Erro signalled when an OS failure occurs.
error.
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Symbol macros, Previous: Internals, Up: Internals [Contents][Index]
Next: Macros, Previous: Special variables, Up: Internals [Contents][Index]
Next: Ordinary functions, Previous: Symbol macros, Up: Internals [Contents][Index]
Next: Generic functions, Previous: Macros, Up: Internals [Contents][Index]
Next: Conditions, Previous: Ordinary functions, Up: Internals [Contents][Index]
code.
Next: Classes, Previous: Generic functions, Up: Internals [Contents][Index]
(quote nil)
:function-name
This slot is read-only.
Previous: Definitions, Up: The file-notify Reference Manual [Contents][Index]
Jump to: | %
(
C D E F G H I L M P S U W |
---|
Jump to: | %
(
C D E F G H I L M P S U W |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
C E F M S |
---|
Jump to: | *
C E F M S |
---|
Jump to: | C D E F I O P S W |
---|
Jump to: | C D E F I O P S W |
---|