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 341
341: def needed?
342: return true unless File.exist?(name)
343: return true if out_of_date?(timestamp)
344: false
345: end
Time stamp for file task.
[ show source ]
# File lib/rake.rb, line 348
348: def timestamp
349: if File.exist?(name)
350: File.mtime(name.to_s)
351: else
352: Rake::EARLY
353: end
354: end