Class | Rake::FileTask
In: | lib/rake.rb
Parent: | 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.

[Source]

         # File lib/rake.rb, line 751
    751:     def needed?
    752:       return true unless File.exist?(name)
    753:       return true if out_of_date?(timestamp)
    754:       false
    755:     end

timestamp()

Time stamp for file task.

[Source]

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

[Validate]