# File lib/fssm/backends/rubycocoa/fsevents.rb, line 10 def initialize(fsevents_object, id, path) @fsevents_object, @id, @path = fsevents_object, id, path end
Returns an array of the files/dirs in the path that the event occurred in. The files are sorted by the modification time, the first entry is the last modified file.
# File lib/fssm/backends/rubycocoa/fsevents.rb, line 16 def files Dir.glob("#{File.expand_path(path)}/*").sort_by { |f| File.mtime(f) }.reverse end
Returns the last modified file in the path that the event occurred in.
# File lib/fssm/backends/rubycocoa/fsevents.rb, line 21 def last_modified_file files.first end