The fs-watcher Reference Manual

Table of Contents

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

The fs-watcher Reference Manual

This is the fs-watcher Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:54:57 2018 GMT+0.


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

1 Introduction

fs-watcher

Description

Watches for filesystem changes to act upon them.

Documentation

There is not much to this library. Only a single function.

Installation

(ql:quickload 'fs-watcher)

The watch function

This is the signature of the function:

(fs-watcher:watch pathnames callback &key (delay 1))

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.

Usage example

(fs-watcher:watch "/home/user/code/" #'(lambda (pathname)
                                         (inferior-shell:run/s "make")))

Contributors

License

MIT License.


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 fs-watcher

Author

Florian Margaine <florian@margaine.com>

License

MIT License

Description

Filesystem watcher for changes

Dependencies
Source

fs-watcher.asd (file)

Components

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

3 Files

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


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

3.1 Lisp


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

3.1.1 fs-watcher.asd

Location

fs-watcher.asd

Systems

fs-watcher (system)


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

3.1.2 fs-watcher/src/package.lisp

Parent

fs-watcher (system)

Location

src/package.lisp

Packages

fs-watcher


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

3.1.3 fs-watcher/src/fs-watcher.lisp

Dependency

src/package.lisp (file)

Parent

fs-watcher (system)

Location

src/fs-watcher.lisp

Exported Definitions

watch (function)

Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 fs-watcher

Source

src/package.lisp (file)

Use List
Exported Definitions

watch (function)

Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Functions

Function: watch PATHNAMES CALLBACK &key DELAY

Watches a list of pathnames

Package

fs-watcher

Source

src/fs-watcher.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Functions

Function: dir-contents PATHNAMES

For each directory, collect the file pathnames recursively. Results are appended and returned as a single list.

Package

fs-watcher

Source

src/fs-watcher.lisp (file)

Function: mtime PATHNAME

Returns the mtime of a pathname

Package

fs-watcher

Source

src/fs-watcher.lisp (file)

Function: run-loop PATHNAMES MTIMES CALLBACK DELAY

The main loop constantly polling the filesystem

Package

fs-watcher

Source

src/fs-watcher.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, fs-watcher.asd: The fs-watcher<dot>asd file
File, Lisp, fs-watcher/src/fs-watcher.lisp: The fs-watcher/src/fs-watcher<dot>lisp file
File, Lisp, fs-watcher/src/package.lisp: The fs-watcher/src/package<dot>lisp file
fs-watcher.asd: The fs-watcher<dot>asd file
fs-watcher/src/fs-watcher.lisp: The fs-watcher/src/fs-watcher<dot>lisp file
fs-watcher/src/package.lisp: The fs-watcher/src/package<dot>lisp file

L
Lisp File, fs-watcher.asd: The fs-watcher<dot>asd file
Lisp File, fs-watcher/src/fs-watcher.lisp: The fs-watcher/src/fs-watcher<dot>lisp file
Lisp File, fs-watcher/src/package.lisp: The fs-watcher/src/package<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   D   F   M   R   W  
Index Entry  Section

D
dir-contents: Internal functions

F
Function, dir-contents: Internal functions
Function, mtime: Internal functions
Function, run-loop: Internal functions
Function, watch: Exported functions

M
mtime: Internal functions

R
run-loop: Internal functions

W
watch: Exported functions

Jump to:   D   F   M   R   W  

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

A.3 Variables


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

A.4 Data types

Jump to:   F   P   S  
Index Entry  Section

F
fs-watcher: The fs-watcher system
fs-watcher: The fs-watcher package

P
Package, fs-watcher: The fs-watcher package

S
System, fs-watcher: The fs-watcher system

Jump to:   F   P   S