Skip to content
class method

FileUtils.uptodate?

(::FileUtils::path new, ::_Each[::FileUtils::path] old_list) -> bool
uptodate?(new, old_list)

Returns true if the file at path new is newer than all the files at paths in array old_list; false otherwise.

Argument new and the elements of old_list should be interpretable as paths:

Example
FileUtils.uptodate?('Rakefile', ['Gemfile', 'README.md']) # => true
FileUtils.uptodate?('Gemfile', ['Rakefile', 'README.md']) # => false

A non-existent file is considered to be infinitely old.

Related: FileUtils.touch.

See also #uptodate? .touch #cd .symlink also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0