Class
Rake::FileTask
In: lib/rake.rb
Parent: Rake::Task

######################################################################### 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

needed?, timestamp,
Public Instance methods
needed?()

Is this file task needed? Yes if it doesn’t exist, or if its time stamp is out of date.

     # File lib/rake.rb, line 751
751:     def needed?
752:       ! File.exist?(name) || out_of_date?(timestamp)
753:     end
timestamp()

Time stamp for file task.

     # File lib/rake.rb, line 756
756:     def timestamp
757:       if File.exist?(name)
758:         File.mtime(name.to_s)
759:       else
760:         Rake::EARLY
761:       end
762:     end