Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A lightweight, simple API for watching the file system

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 vigilo.gemspec
README.markdown

What is Vigilo?

Vigilo is a dead-simple file system watcher for Ruby.

API

Vigilo::Watcher.watch(dir1, dir2) do |changed, added, deleted|
  # created is an Array of files changed, or nil if none changed
  # added is an Array of files added, or nil if none added
  # deleted is an Array of files deleted, or nil if none deleted
end

You can also start a watch inside a thread to keep it going in the background.

Resource usage

On my Mac, the portable (polling) backend used 2.5% CPU while the FSEvents backend used 0.4% CPU.

In progress

Vigilo is brand new and currently only has support for FSEvents and File System polling. Support for inotify is coming.

At the moment, I have only tested it on my local machine and the final API isn't in place, so feel free to look, but don't rely on anything just yet.

Tests are in progress.

Something went wrong with that request. Please try again.