3 .\" Manual for watching for file changes
5 .\" (c) 2001, 2005, 2009, 2023, 2024 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of the mLib utilities library.
12 .\" mLib is free software: you can redistribute it and/or modify it under
13 .\" the terms of the GNU Library General Public License as published by
14 .\" the Free Software Foundation; either version 2 of the License, or (at
15 .\" your option) any later version.
17 .\" mLib is distributed in the hope that it will be useful, but WITHOUT
18 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
20 .\" License for more details.
22 .\" You should have received a copy of the GNU Library General Public
23 .\" License along with mLib. If not, write to the Free Software
24 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27 .\"--------------------------------------------------------------------------
28 .so ../defs.man \" @@@PRE@@@
30 .\"--------------------------------------------------------------------------
31 .TH fwatch 3mLib "3 February 2001" "Straylight/Edgeware" "mLib utilities library"
37 .\"--------------------------------------------------------------------------
39 fwatch \- watch a file for changes
41 .\"--------------------------------------------------------------------------
45 .B "#include <mLib/fwatch.h>"
47 .B "typedef struct { ...\& } fwatch;"
49 .BI "void fwatch_init(fwatch *" f ", const char *" name );
50 .BI "void fwatch_initfd(fwatch *" f ", int " fd );
51 .BI "int fwatch_update(fwatch *" f ", const char *" name );
52 .BI "int fwatch_updatefd(fwatch *" f ", int " fd );
55 .\"--------------------------------------------------------------------------
58 These functions watch a file for changes. Use
64 block with information about a file; then later, the functions
68 will update the information in the structure and inform you whether the
73 functions can't return errors: they remember errors as part of the file
76 functions return zero if the file has not changed or nonzero if it has.
78 .\"--------------------------------------------------------------------------
83 .\"--------------------------------------------------------------------------
86 Mark Wooding, <mdw@distorted.org.uk>
88 .\"----- That's all, folks --------------------------------------------------