Sha256: 087ead5e7cd710e247f1b70e8897d08f956191628c98fa9e5f5db6d82cef2814
Contents?: true
Size: 542 Bytes
Versions: 10
Compression:
Stored size: 542 Bytes
Contents
require 'pathname' module Vagrant module Util class Directory # 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] 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 end end end
Version data entries
10 entries across 10 versions & 3 rubygems