View on GitHub

Fsw

A file change monitor with multiple backends: Apple OS X File System Events API, *BSD kqueue, Linux inotify and a stat-based backend.

Download this project as a .zip file Download this project as a tar.gz file

fsw is a file change monitor that receives notifications when the contents of the specified files or directories are modified. fsw implements four kinds of monitors:

fsw should build and work correctly on any system shipping either of the aforementioned APIs.

Getting fsw

The recommended way to get the sources of fsw in order to build it on your system is getting a release tarball. A release tarball contains everything a user needs to build fsw on his system, following the instructions detailed in the Installation section below and the INSTALL file.

Getting a copy of the source repository is not recommended, unless you are a developer, you have the GNU Build System installed on your machine and you know how to boostrap it on the sources.

Installation

See the INSTALL file for detailed information about how to configure and install fsw.

fsw is a C++ program and a C++ compiler compliant with the C++11 standard is required to build it. A complete C/C++ toolchain for OS X is provided with Apple XCode, which can freely installed from the Apple App Store.

No other software packages or dependencies are required to configure and install fsw but the aforementioned APIs used by the file system monitors.

Usage

fsw accepts a list of paths for which change events should be received:

$ fsw [options] ... path-0 ... path-n

The event stream is created even if any of the paths do not exist yet. If they are created after fsw is launched, change events will be properly received. Depending on the wathcher being used, newly created paths will be monitored after the amount of configured latency has elapsed.

For more information, refer to the fsw man page.


Copyright (C) 2014 Enrico M. Crisostomo

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.