# Directory\_watcher (version 1.2.0)

**URL:** <https://www.ruby-forum.com/t/directory-watcher-version-1-2-0/165340>\
**Category:** Ruby\
**Created:** [April 12, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/directory-watcher-version-1-2-0/165340 "2009-04-12T19:45:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 12, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/directory-watcher-version-1-2-0/165340/1 "2009-04-12T19:45:12Z")

</div>

directory\_watcher version 1.2.0  
by Tim P.  
[http://codeforpeople.rubyforge.org/directory\_watcher](http://codeforpeople.rubyforge.org/directory_watcher)

== DESCRIPTION

## The directory watcher operates by scanning a directory at some interval and generating a list of files based on a user supplied glob pattern. As the file list changes from one interval to the next, events are generated and dispatched to registered observers. Four types of events are supported

added, modified, stable, and removed.

== CHANGES

- 2 minor enhancements
  - added an option to persist state to a file [Benjamin T.]
  - the option to run the directory watcher scanner manually  
(i.e. one loop at a time)

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 12, 2009, 9:24pm UTC](https://www.ruby-forum.com/t/directory-watcher-version-1-2-0/165340/2 "2009-04-12T21:24:07Z")

</div>

12 apr 2009 kl. 19.44 skrev Tim P.:

> The directory watcher operates by scanning a directory at some  
> interval and  
> generating a list of files based on a user supplied glob pattern.

Hi,

directory\_watcher sounds like the ideal candidate to make use of  
filesystem event notifications such as those provided by inotify or  
fsevents. Are there any plans for this in a future version of  
directory\_watcher?

Regards,

Denis

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 12, 2009, 11:25pm UTC](https://www.ruby-forum.com/t/directory-watcher-version-1-2-0/165340/3 "2009-04-12T23:25:52Z")

</div>

On Sun, Apr 12, 2009 at 1:23 PM, Denis D. \<  
removed\_email\_address@domain.invalid\> wrote:

> directory\_watcher sounds like the ideal candidate to make use of filesystem  
> event notifications such as those provided by inotify or fsevents. Are there  
> any plans for this in a future version of directory\_watcher?

Note that such a thing would be fairly trivial to add to Rev, as libev  
already supports a cross-platform API for directory monitoring which  
uses  
inotify on Linux:

[http://rev.rubyforge.org/](http://rev.rubyforge.org/)
