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).
Is this file task needed? Yes if it doesn‘t exist, or if its time stamp is out of date.
[Source]
# File lib/rake.rb, line 508 508: def needed? 509: return true unless File.exist?(name) 510: return true if out_of_date?(timestamp) 511: false 512: end
Time stamp for file task.
# File lib/rake.rb, line 515 515: def timestamp 516: if File.exist?(name) 517: File.mtime(name.to_s) 518: else 519: Rake::EARLY 520: end 521: end
[Validate]