@@@ man wip
[mLib] / sys / fwatch.3
CommitLineData
32e1147e 1.\" -*-nroff-*-
fbf20b5b 2.TH fwatch 3 "3 February 2001" "Straylight/Edgeware" "mLib utilities library"
32e1147e 3.SH NAME
4fwatch \- watch a file for changes
5.\" @fwatch_init
6.\" @fwatch_initfd
7.\" @fwatch_update
8.\" @fwatch_updatefd
9.SH SYNOPSIS
10.nf
11.B "#include <mLib/fwatch.h>"
d056fbdf 12.PP
4729aa69 13.B "typedef struct { ...\& } fwatch;"
d056fbdf 14.PP
32e1147e 15.BI "void fwatch_init(fwatch *" f ", const char *" name );
16.BI "void fwatch_initfd(fwatch *" f ", int " fd );
17.BI "int fwatch_update(fwatch *" f ", const char *" name );
18.BI "int fwatch_updatefd(fwatch *" f ", int " fd );
19.fi
20.SH DESCRIPTION
21These functions watch a file for changes. Use
22.B fwatch_init
23or
24.B fwatch_initfd
25to initialize a
26.B fwatch
27block with information about a file; then later, the functions
28.B fwatch_update
29and
30.B fwatch_updatefd
31will update the information in the structure and inform you whether the
32file changed.
33.PP
34The
35.B fwatch
36functions can't return errors: they remember errors as part of the file
37state instead. The
38.B update
39functions return zero if the file has not changed or nonzero if it has.
40.SH SEE ALSO
41.BR mLib (3).
42.SH AUTHOR
9b5ac6ff 43Mark Wooding, <mdw@distorted.org.uk>