A FileTask is a task that includes time based dependencies. If any of a FileTask‘s prerequisites have a timestamp that is later than the file represented by this task, then the file must be rebuilt (using the supplied actions).
Methods
Public Instance methods
Is this file task needed? Yes if it doesn‘t exist, or if its time stamp is out of date.
[ show source ]
# File lib/rake.rb, line 770 770: def needed? 771: ! File.exist?(name) || out_of_date?(timestamp) 772: end
Time stamp for file task.
[ show source ]
# File lib/rake.rb, line 775 775: def timestamp 776: if File.exist?(name) 777: File.mtime(name.to_s) 778: else 779: Rake::EARLY 780: end 781: end