PHP 8.2.31
Preview: file_task.rb Size: 1.28 KB
/proc/thread-self/root/opt/alt/ruby20/lib64/ruby/2.0.0/rake/file_task.rb

require 'rake/task.rb'
require 'rake/early_time'

module Rake
  # #########################################################################
  # 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).
  #
  class FileTask < Task

    # Is this file task needed?  Yes if it doesn't exist, or if its time stamp
    # is out of date.
    def needed?
      ! File.exist?(name) || out_of_date?(timestamp)
    end

    # Time stamp for file task.
    def timestamp
      if File.exist?(name)
        File.mtime(name.to_s)
      else
        Rake::EARLY
      end
    end

    private

    # Are there any prerequisites with a later time than the given time stamp?
    def out_of_date?(stamp)
      @prerequisites.any? { |n| application[n, @scope].timestamp > stamp}
    end

    # ----------------------------------------------------------------
    # Task class methods.
    #
    class << self
      # Apply the scope to the task name according to the rules for this kind
      # of task.  File based tasks ignore the scope when creating the name.
      def scope_name(scope, task_name)
        task_name
      end
    end
  end
end

Directory Contents

Dirs: 4 × Files: 42

Name Size Perms Modified Actions
contrib DIR
- drwxr-xr-x 2024-03-03 22:53:08
Edit Download
ext DIR
- drwxr-xr-x 2024-03-03 22:53:08
Edit Download
lib DIR
- drwxr-xr-x 2024-03-03 22:53:08
Edit Download
loaders DIR
- drwxr-xr-x 2024-03-03 22:53:08
Edit Download
3.14 KB lrw-r--r-- 2011-06-23 22:11:55
Edit Download
21.27 KB lrw-r--r-- 2012-11-29 19:16:46
Edit Download
622 B lrw-r--r-- 2012-11-30 03:21:06
Edit Download
408 B lrw-r--r-- 2011-06-28 02:45:29
Edit Download
1.00 KB lrw-r--r-- 2012-11-15 21:59:37
Edit Download
482 B lrw-r--r-- 2012-11-15 21:59:37
Edit Download
164 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
5.02 KB lrw-r--r-- 2012-11-15 21:59:37
Edit Download
273 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
670 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
11.50 KB lrw-r--r-- 2012-11-29 19:16:46
Edit Download
1.28 KB lrw-r--r-- 2011-06-23 22:11:55
Edit Download
3.01 KB lrw-r--r-- 2012-12-06 07:35:45
Edit Download
4.10 KB lrw-r--r-- 2012-11-15 21:59:37
Edit Download
283 B lrw-r--r-- 2011-06-28 02:45:29
Edit Download
962 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
431 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
315 B lrw-r--r-- 2012-11-15 21:59:37
Edit Download
618 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
5.07 KB lrw-r--r-- 2011-06-23 22:11:55
Edit Download
26 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
351 B lrw-r--r-- 2012-11-15 22:32:34
Edit Download
364 B lrw-r--r-- 2012-11-15 22:01:58
Edit Download
2.33 KB lrw-r--r-- 2012-11-15 22:01:58
Edit Download
422 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
727 B lrw-r--r-- 2012-11-15 22:32:34
Edit Download
341 B lrw-r--r-- 2011-06-28 02:45:29
Edit Download
6.55 KB lrw-r--r-- 2012-11-15 21:59:37
Edit Download
843 B lrw-r--r-- 2012-11-22 05:32:31
Edit Download
353 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
468 B lrw-r--r-- 2012-11-15 22:32:34
Edit Download
10.17 KB lrw-r--r-- 2012-11-29 19:16:46
Edit Download
580 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
1.63 KB lrw-r--r-- 2012-11-15 21:59:37
Edit Download
119 B lrw-r--r-- 2011-06-23 22:11:55
Edit Download
8.78 KB lrw-r--r-- 2012-11-15 21:59:37
Edit Download
5.18 KB lrw-r--r-- 2012-11-15 22:32:34
Edit Download
1.10 KB lrw-r--r-- 2012-11-15 22:01:58
Edit Download
4.67 KB lrw-r--r-- 2012-11-15 22:01:58
Edit Download
488 B lrw-r--r-- 2012-11-29 19:16:46
Edit Download
187 B lrw-r--r-- 2012-12-21 02:34:37
Edit Download
1.53 KB lrw-r--r-- 2011-06-23 22:11:55
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).