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