class Vagrant::Util::Directory

Public Class Methods

directory_changed?(dir_path, threshold_time) click to toggle source

Check if directory has any new updates

@param [Pathname, String] Path to directory @param [Time] time to compare to eg. has any file in dir_path

changed since this time

@return [Boolean]

# File lib/vagrant/util/directory.rb, line 12
def self.directory_changed?(dir_path, threshold_time)
  Dir.glob(Pathname.new(dir_path).join("**", "*")).any? do |path|
    Pathname.new(path).mtime > threshold_time
  end
end