Path: | lib/directory_watcher/scanner.rb |
Last Update: | Tue Jan 04 17:16:42 +0000 2011 |
The Scanner is responsible for polling the watched directory at a regular interval and generating events when files are modified, added or removed. These events are passed to the DirectoryWatcher which notifies the registered observers.
The Scanner is a pure Ruby class, and as such it works across all Ruby interpreters on the major platforms. This also means that it can be processor intensive for large numbers of files or very fast update intervals. Your mileage will vary, but it is something to keep an eye on.