module Piggly::Util::File
Public Class Methods
stale?(target, *sources)
click to toggle source
True if target file is older (by mtime) than any source file
# File lib/piggly/util/file.rb, line 6 def self.stale?(target, *sources) if ::File.exists?(target) oldest = ::File.mtime(target) sources.any?{|x| ::File.mtime(x) > oldest } else true end end