Options: (none)
Returns true if newer is newer than all old_list. Non-existent files are older than any file.
FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or # system 'make hello.o'
Source Code
# File fileutils.rb, line 141 def uptodate?(new, old_list, options = nil) raise ArgumentError, 'uptodate? does not accept any option' if options return false unless File.exist?(new) new_time = File.mtime(new) old_list.each do |old| if File.exist?(old) return false unless new_time > File.mtime(old) end end true end
<code/>and<pre/>for code samples.