######################################################################### 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.
15: def needed?
16: ! File.exist?(name) || out_of_date?(timestamp)
17: end
Time stamp for file task.
20: def timestamp
21: if File.exist?(name)
22: File.mtime(name.to_s)
23: else
24: Rake::EARLY
25: end
26: end