PHP 8.2.31
Preview: file_task.rb Size: 1.26 KB
//proc/thread-self/root/opt/alt/ruby24/lib64/ruby/gems/2.4.0/gems/rake-12.0.0/lib/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) || @application.options.build_all
    end

    # Time stamp for file task.
    def timestamp
      if File.exist?(name)
        File.mtime(name.to_s)
      else
        Rake::LATE
      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)
        Rake.from_pathname(task_name)
      end
    end
  end
end

Directory Contents

Dirs: 2 × Files: 39

Name Size Perms Modified Actions
ext DIR
- drwxr-xr-x 2024-03-03 22:50:40
Edit Download
loaders DIR
- drwxr-xr-x 2024-03-03 22:50:40
Edit Download
23.07 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
866 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
2.00 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
418 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
2.29 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
235 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
5.45 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
340 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
670 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
12.41 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
1.26 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
3.73 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
4.05 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
1.16 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
431 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
265 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
2.74 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
1.49 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
672 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
5.54 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
351 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
364 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
2.25 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
375 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
770 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
340 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
352 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
869 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
11.38 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
135 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
2.38 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
119 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
8.73 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
5.95 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
1.10 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
4.64 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download
545 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
178 B lrw-r--r-- 2020-03-31 11:42:20
Edit Download
1.49 KB lrw-r--r-- 2020-03-31 11:42:20
Edit Download

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