Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

FileUtils#uptodate?

uptodate?(new, old_list)

Returns true if new is newer than all old_list. Non-existent files are older than any file.

Example
FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \
    system 'make hello.o'
See also .uptodate? #touch #symlink also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1