v6.0.0 - Show latest stable - 0 notes - Superclass: Object

Allows you to “listen” to changes in a file system. The evented file updater does not hit disk when checking for updates instead it uses platform specific file system events to trigger a change in state.

The file checker takes an array of files to watch or a hash specifying directories and file extensions to watch. It also takes a block that is called when EventedFileUpdateChecker#execute is run or when EventedFileUpdateChecker#execute_if_updated is run and there have been changes to the file system.

Note: Forking will cause the first call to `updated?` to return `true`.


checker = ActiveSupport::EventedFileUpdateChecker.new(["/tmp/foo"]) { puts "changed" }
# => false
# => nil


# => true
# => "changed"
Show files where this class is defined (1 file)
Register or log in to add new notes.