Class: Vagrant::Util::Directory
- Inherits:
-
Object
- Object
- Vagrant::Util::Directory
- Defined in:
- lib/vagrant/util/directory.rb
Class Method Summary collapse
-
.directory_changed?(dir_path, threshold_time) ⇒ Boolean
Check if directory has any new updates.
Class Method Details
.directory_changed?(dir_path, threshold_time) ⇒ Boolean
Check if directory has any new updates
15 16 17 18 19 |
# File 'lib/vagrant/util/directory.rb', line 15 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 |