Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the fs-watcher Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:35:06 2022 GMT+0.
Next: Systems, Previous: The fs-watcher Reference Manual, Up: The fs-watcher Reference Manual [Contents][Index]
Watches for filesystem changes to act upon them.
There is not much to this library. Only a single function.
(ql:quickload 'fs-watcher)
This is the signature of the function:
(fs-watcher:watch pathnames callback &key (delay 1))
pathnames
is a pathname or a list of pathnames. Both are accepted.callback
is a callback function called on each change.:delay
is the looping delay.At first, the function will get the list of all pathnames. For example,
if you give a directory pathname, fs-watcher
will recursively look for
files and directories in it.
Once it has all the necessary information, it constantly polls for them to see if there is any change. This polling is done every second by default.
Whenever there is a change, the callback
is called with an argument:
the pathname that changed.
(fs-watcher:watch "/home/user/code/" #'(lambda (pathname)
(inferior-shell:run/s "make")))
MIT License.
Next: Files, Previous: Introduction, Up: The fs-watcher Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Filesystem watcher for changes
Florian Margaine <florian@margaine.com>
MIT License
Next: Packages, Previous: Systems, Up: The fs-watcher Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: fs-watcher/src/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
fs-watcher (system).
Next: fs-watcher/src/fs-watcher.lisp, Previous: fs-watcher/fs-watcher.asd, Up: Lisp [Contents][Index]
fs-watcher (system).
Previous: fs-watcher/src/package.lisp, Up: Lisp [Contents][Index]
src/package.lisp (file).
fs-watcher (system).
watch (function).
Next: Definitions, Previous: Files, Up: The fs-watcher Reference Manual [Contents][Index]
Packages are listed by definition order.
watch (function).
Next: Indexes, Previous: Packages, Up: The fs-watcher 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]
Previous: Public Interface, Up: Public Interface [Contents][Index]
Watches a list of pathnames
Previous: Public Interface, Up: Definitions [Contents][Index]
For each directory, collect the file pathnames recursively. Results are appended and returned as a single list.
Returns the mtime of a pathname
The main loop constantly polling the filesystem
Previous: Definitions, Up: The fs-watcher Reference Manual [Contents][Index]
Jump to: | D F M R W |
---|
Jump to: | D F M R W |
---|
Jump to: | F P S |
---|
Jump to: | F P S |
---|