[![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat)](https://github.com/emcrisostomo/fswatch/blob/master/LICENSE)
README
======
`fswatch` is a file change monitor that receives notifications when the contents
of the specified files or directories are modified. `fswatch` implements four
kinds of monitors:
* A monitor based on the _File System Events API_ of Apple OS X.
* A monitor based on _kqueue_, a notification interface introduced in FreeBSD
4.1 (and supported on most *BSD systems, including OS X).
* A monitor based on the _File Events Notification_ API of the Solaris kernel
and its derivatives.
* A monitor based on _inotify_, a Linux kernel subsystem that reports file
system changes to applications.
* A monitor based on _ReadDirectoryChangesW_, a Microsoft Windows API that
reports changes to a directory.
* A monitor which periodically stats the file system, saves file modification
times in memory, and manually calculates file system changes (which works
anywhere `stat (2)` can be used).
`fswatch` should build and work correctly on any system shipping either of the
aforementioned APIs.
Table of Contents
-----------------
* [Features](#features)
* [Limitations](#limitations)
* [Getting fswatch](#getting-fswatch)
* [Building from Source](#building-from-source)
* [Installation](#installation)
* [Documentation](#documentation)
* [Localization](#localization)
* [Usage](#usage)
* [Contributing](#contributing)
* [Bug Reports](#bug-reports)
Features
--------
`fswatch` main features are:
* Support for many OS-specific APIs such as kevent, inotify, and FSEvents.
* Recursive directory monitoring.
* Path filtering using including and excluding regular expressions.
* Customizable record format.
* Support for periodic idle events.
Limitations
-----------
The limitations of `fswatch` depend largely on the monitor being used:
* The **FSEvents** monitor, available only on OS X, has no known limitations,
and scales very well with the number of files being observed.
* The **File Events Notification** monitor, available on Solaris kernels and
its derivatives, has no known limitations.
* The **kqueue** monitor, available on any \*BSD system featuring kqueue,
requires a file descriptor to be opened for every file being watched. As a
result, this monitor scales badly with the number of files being observed,
and may begin to misbehave as soon as the `fswatch` process runs out of file
descriptors. In this case, `fswatch` dumps one error on standard error for
every file that cannot be opened.
* The **inotify** monitor, available on Linux since kernel 2.6.13, may suffer
a queue overflow if events are generated faster than they are read from the
queue. In any case, the application is guaranteed to receive an overflow
notification which can be handled to gracefully recover. `fswatch`
currently throws an exception if a queue overflow occurs. Future versions
will handle the overflow by emitting proper notifications.
* The **Windows** monitor can only establish a watch _directories_, not files.
To watch a file, its parent directory must be watched in order to receive
change events for all the directory's children, _recursively_ at any depth.
Optionally, change events can be filtered to include only changes to the
desired file.
* The **poll** monitor, available on any platform, only relies on
available CPU and memory to perform its task. The performance of this
monitor degrades linearly with the number of files being watched.
Usage recommendations are as follows:
* On OS X, use only the `FSEvents` monitor (which is the default behaviour).
* On Solaris and its derivatives use the _File Events Notification_ monitor.
* On Linux, use the `inotify` monitor (which is the default behaviour).
* If the number of files to observe is sufficiently small, use the `kqueue`
monitor. Beware that on some systems the maximum number of file descriptors
that can be opened by a process is set to a very low value (values as low as
256 are not uncommon), even if the operating system may allow a much larger
value. In this case, check your OS documentation to raise this limit on
either a per process or a system-wide basis.
* If feasible, watch directories instead of files. Properly crafting the
receiving side of the events to deal with directories may sensibly reduce
the monitor resource consumption.
* On Windows, use the `windows` monitor.
* If none of the above applies, use the poll monitor. The authors' experience
indicates that `fswatch` requires approximately 150 MB of RAM memory to
observe a hierarchy of 500.000 files with a minimum path length of 32
characters. A common bottleneck of the poll monitor is disk access, since
`stat()`-ing a great number of files may take a huge amount of time. In
this case, the latency should be set to a sufficiently large value in order
to reduce the performance degradation that may result from frequent disk
access.
Getting fswatch
---------------
A regular user may be able to fetch `fswatch` from the package manager of your
OS or a third-party one. If you are looking for `fswatch` for OS X, you can
install it using either [MacPorts] or [Homebrew]:
```
# MacPorts
$ port install fswatch
# Homebrew
$ brew install fswatch
```
Check your favourite package manager and let us know if `fswatch` is missing
there.
[MacPorts]: https://www.macports.org
[Homebrew]: http://brew.sh
Building from Source
--------------------
A user who wishes to build `fswatch` should get a [release tarball][release].
A release tarball contains everything a user needs to build `fswatch` on their
system, following the instructions detailed in the Installation section below
and the `INSTALL` file.
A developer who wishes to modify `fswatch` should get the sources (either from a
source tarball or cloning the repository) and have the GNU Build System
installed on their machine. Please read `README.gnu-build-system` to get further
details about how to bootstrap `fswatch` from sources on your machine.
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 bootstrap it on the sources.
[release]: https://github.com/emcrisostomo/fswatch/releases
Installation
------------
See the `INSTALL` file for detailed information about how to configure and
install `fswatch`. Since the `fswatch` builds and uses dynamic libraries, in
some platforms you may need to perform additional tasks before you can use
`fswatch`:
* Make sure the installation directory of dynamic libraries (`$PREFIX/lib`) is
included in the lookup paths of the dynamic linker of your operating system.
The default path, `/usr/local/lib`, will work in nearly every operating
system.
* Refreshing the links and cache to the dynamic libraries may be required. In
GNU/Linux systems you may need to run `ldconfig`:
$ ldconfig
`fswatch` is a C++ program and a C++ compiler compliant with the C++11 standard
is required to compile it. Check your OS documentation for information about
how to install the C++ toolchain and the C++ runtime.
No other software packages or dependencies are required to configure and install
`fswatch` but the aforementioned APIs used by the file system monitors.
Documentation
-------------
`fswatch` provides the following [documentation]:
* Texinfo documentation, included with the distribution.
* HTML documentation.
* PDF documentation.
* A [wiki] page.
* A man page.
`fswatch` official documentation is provided in Texinfo format. This is the
most comprehensive source of information about `fswatch` and the only
authoritative one. The man page, in particular, is a stub that suggests the
user
没有合适的资源?快使用搜索试试~ 我知道了~
Linux / Mac / Windows下文件监控软件
需积分: 32 8 下载量 107 浏览量
2017-05-04
13:48:35
上传
评论
收藏 1.19MB GZ 举报
温馨提示
共451个文件
m4:88个
hpp:40个
cpp:40个
Linux / Mac / Windows下文件监控软件,可以用来做软件的热加载
资源推荐
资源详情
资源评论
收起资源包目录
Linux / Mac / Windows下文件监控软件 (451个子文件)
._fswatch-1.9.3 311B
fswatch.7 18KB
._fswatch.7 280B
._ABOUT-NLS 280B
._ABOUT-NLS 280B
._ar-lib 280B
._ar-lib 280B
._AUTHORS 280B
._AUTHORS 280B
._c 311B
._c++ 311B
._ChangeLog 280B
._ChangeLog 280B
._compile 280B
._compile 280B
._config 311B
._config 311B
._configure 280B
._configure 280B
._COPYING 280B
._COPYING 280B
._depcomp 280B
._depcomp 280B
._doc 311B
._doc 311B
._doxygen 311B
._INSTALL 280B
._INSTALL 280B
._install-sh 280B
._install-sh 280B
._libfswatch 311B
._libfswatch 311B
._LICENSE 280B
._LICENSE 280B
._LINGUAS 280B
._LINGUAS 280B
._m4 311B
._m4 311B
._Makevars 280B
._Makevars 280B
._man 311B
._mdate-sh 280B
._missing 280B
._missing 280B
._NEWS 280B
._NEWS 280B
._po 311B
._po 311B
._README 280B
._README 280B
._Rules-quot 280B
._Rules-quot 280B
._src 311B
._src 311B
._stamp-po 280B
._stamp-po 280B
._stamp-vti 280B
._string 311B
._windows 311B
ABOUT-NLS 92KB
ABOUT-NLS 92KB
configure.ac 8KB
configure.ac 3KB
._configure.ac 280B
._configure.ac 280B
Makefile.am 4KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 930B
Makefile.am 738B
Makefile.am 691B
Makefile.am 688B
._Makefile.am 280B
._Makefile.am 280B
._Makefile.am 280B
._Makefile.am 280B
._Makefile.am 280B
._Makefile.am 280B
._Makefile.am 280B
._Makefile.am 280B
ar-lib 6KB
ar-lib 6KB
AUTHORS 147B
AUTHORS 91B
README.bsd 968B
._README.bsd 280B
ChangeLog 45KB
ChangeLog 45KB
README.codestyle 2KB
._README.codestyle 280B
compile 7KB
compile 7KB
configure 705KB
configure 684KB
COPYING 34KB
COPYING 34KB
libfswatch.cpp 28KB
fswatch.cpp 22KB
inotify_monitor.cpp 14KB
共 451 条
- 1
- 2
- 3
- 4
- 5
资源评论
努力换取成功
- 粉丝: 2
- 资源: 33
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于CarNet实现裂缝检测python源码+文档说明+数据+图片(课程设计)
- 课程设计-基于耐火材料裂缝剥落检测python源码+课件
- 基于OpenCV的视频道路车道检测python源码+文档说明+实验演示+图片+使用方法(高分毕业设计)
- 基于OpenCV的案例:图像边缘、角点和轮廓检测,图像分割,图像增强;图片拼接;运动目标检测,颜色直方图比较,三帧帧差法,抠图
- SmartPlug-html大一笔记
- SmartPlug-proteusdemo
- Preliminary Findings on Handmade Rattan Baby Crib andBassinet Designs Regarding.zip
- aveebfq_v1.2.83_downyi.com.apk
- 基于有机发光二极管(OLED)的建模优化算法的matlab仿真源码+数据+文档说明+项目说明(高分课程设计)
- hash01-test.c 本人哈希表(一)的示例代码,仅供参考!
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功