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. Three types of events are supported -- added, modified, and removed.
Gemfile gem 'directory_watcher', '~> 1.4.1'
install gem install directory_watcher -v 1.4.1