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 500
    500:     def needed?
    501:       return true unless File.exist?(name)
    502:       return true if out_of_date?(timestamp)
    503:       false
    504:     end

timestamp()

Time stamp for file task.

[Source]

         # File lib/rake.rb, line 507
    507:     def timestamp
    508:       if File.exist?(name)
    509:         File.mtime(name.to_s)
    510:       else
    511:         Rake::EARLY
    512:       end
    513:     end

[Validate]