$27 GRAYBYTE WORDPRESS FILE MANAGER $64

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby22/lib64/ruby/2.2.0/rake/

HOME
Current File : /opt/alt/ruby22/lib64/ruby/2.2.0/rake//file_utils.rb
require 'rbconfig'
require 'fileutils'

#--
# This a FileUtils extension that defines several additional commands to be
# added to the FileUtils utility functions.
module FileUtils
  # Path to the currently running Ruby program
  RUBY = ENV['RUBY'] || File.join(
    RbConfig::CONFIG['bindir'],
    RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']).
    sub(/.*\s.*/m, '"\&"')

  OPT_TABLE['sh']  = %w(noop verbose)
  OPT_TABLE['ruby'] = %w(noop verbose)

  # Run the system command +cmd+.  If multiple arguments are given the command
  # is run directly (without the shell, same semantics as Kernel::exec and
  # Kernel::system).
  #
  # It is recommended you use the multiple argument form over interpolating
  # user input for both usability and security reasons.  With the multiple
  # argument form you can easily process files with spaces or other shell
  # reserved characters in them.  With the multiple argument form your rake
  # tasks are not vulnerable to users providing an argument like
  # <code>; rm # -rf /</code>.
  #
  # If a block is given, upon command completion the block is called with an
  # OK flag (true on a zero exit status) and a Process::Status object.
  # Without a block a RuntimeError is raised when the command exits non-zero.
  #
  # Examples:
  #
  #   sh 'ls -ltr'
  #
  #   sh 'ls', 'file with spaces'
  #
  #   # check exit status after command runs
  #   sh %{grep pattern file} do |ok, res|
  #     if ! ok
  #       puts "pattern not found (status = #{res.exitstatus})"
  #     end
  #   end
  #
  def sh(*cmd, &block)
    options = (Hash === cmd.last) ? cmd.pop : {}
    shell_runner = block_given? ? block : create_shell_runner(cmd)
    set_verbose_option(options)
    options[:noop] ||= Rake::FileUtilsExt.nowrite_flag
    Rake.rake_check_options options, :noop, :verbose
    Rake.rake_output_message cmd.join(" ") if options[:verbose]

    unless options[:noop]
      res = rake_system(*cmd)
      status = $?
      status = Rake::PseudoStatus.new(1) if !res && status.nil?
      shell_runner.call(res, status)
    end
  end

  def create_shell_runner(cmd) # :nodoc:
    show_command = cmd.join(" ")
    show_command = show_command[0, 42] + "..." unless $trace
    lambda do |ok, status|
      ok or
        fail "Command failed with status (#{status.exitstatus}): " +
        "[#{show_command}]"
    end
  end
  private :create_shell_runner

  def set_verbose_option(options) # :nodoc:
    unless options.key? :verbose
      options[:verbose] =
        (Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT) ||
        Rake::FileUtilsExt.verbose_flag
    end
  end
  private :set_verbose_option

  def rake_system(*cmd) # :nodoc:
    Rake::AltSystem.system(*cmd)
  end
  private :rake_system

  # Run a Ruby interpreter with the given arguments.
  #
  # Example:
  #   ruby %{-pe '$_.upcase!' <README}
  #
  def ruby(*args, &block)
    options = (Hash === args.last) ? args.pop : {}
    if args.length > 1
      sh(*([RUBY] + args + [options]), &block)
    else
      sh("#{RUBY} #{args.first}", options, &block)
    end
  end

  LN_SUPPORTED = [true]

  #  Attempt to do a normal file link, but fall back to a copy if the link
  #  fails.
  def safe_ln(*args)
    if ! LN_SUPPORTED[0]
      cp(*args)
    else
      begin
        ln(*args)
      rescue StandardError, NotImplementedError
        LN_SUPPORTED[0] = false
        cp(*args)
      end
    end
  end

  # Split a file path into individual directory names.
  #
  # Example:
  #   split_all("a/b/c") =>  ['a', 'b', 'c']
  #
  def split_all(path)
    head, tail = File.split(path)
    return [tail] if head == '.' || tail == '/'
    return [head, tail] if head == '/'
    return split_all(head) + [tail]
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.53 PM
root / root
0755
contrib
--
3 Mar 2024 10.53 PM
root / linksafe
0755
ext
--
3 Mar 2024 10.53 PM
root / linksafe
0755
lib
--
26 Jul 2023 2.31 PM
root / linksafe
0755
loaders
--
3 Mar 2024 10.53 PM
root / linksafe
0755
alt_system.rb
3.168 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
application.rb
23.143 KB
6 Dec 2014 12.22 AM
root / linksafe
0644
backtrace.rb
0.848 KB
16 Aug 2014 3.56 AM
root / linksafe
0644
clean.rb
1.931 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
cloneable.rb
0.408 KB
6 Sep 2014 9.31 AM
root / linksafe
0644
cpu_counter.rb
2.828 KB
5 Nov 2014 5.19 AM
root / linksafe
0644
default_loader.rb
0.229 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
dsl_definition.rb
5.643 KB
6 Dec 2014 12.22 AM
root / linksafe
0644
early_time.rb
0.332 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
file_creation_task.rb
0.654 KB
23 Jun 2011 10.11 PM
root / linksafe
0644
file_list.rb
12.129 KB
6 Sep 2014 9.31 AM
root / linksafe
0644
file_task.rb
1.26 KB
25 Nov 2014 7.03 AM
root / linksafe
0644
file_utils.rb
3.662 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
file_utils_ext.rb
4.052 KB
11 Oct 2013 9.35 PM
root / linksafe
0644
gempackagetask.rb
0.141 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
invocation_chain.rb
1.156 KB
27 Aug 2014 12.21 PM
root / linksafe
0644
invocation_exception_mixin.rb
0.421 KB
23 Jun 2011 10.11 PM
root / linksafe
0644
late_time.rb
0.259 KB
25 Nov 2014 7.03 AM
root / linksafe
0644
linked_list.rb
2.268 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
multi_task.rb
0.308 KB
15 Nov 2012 9.59 PM
root / linksafe
0644
name_space.rb
0.657 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
packagetask.rb
5.28 KB
25 Nov 2014 7.03 AM
root / linksafe
0644
pathmap.rb
0.052 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
phony.rb
0.343 KB
15 Nov 2012 10.32 PM
root / linksafe
0644
private_reader.rb
0.355 KB
15 Nov 2012 10.01 PM
root / linksafe
0644
promise.rb
2.282 KB
11 Oct 2013 9.35 PM
root / linksafe
0644
pseudo_status.rb
0.366 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
rake_module.rb
0.752 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
rake_test_loader.rb
0.333 KB
28 Jun 2011 2.45 AM
root / linksafe
0644
rdoctask.rb
0.149 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
ruby182_test_unit_fix.rb
0.876 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
rule_recursion_overflow_error.rb
0.345 KB
23 Jun 2011 10.11 PM
root / linksafe
0644
runtest.rb
0.58 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
scope.rb
0.861 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
task.rb
11.02 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
task_argument_error.rb
0.116 KB
23 Jun 2011 10.11 PM
root / linksafe
0644
task_arguments.rb
2.146 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
task_manager.rb
8.837 KB
25 Nov 2014 7.03 AM
root / linksafe
0644
tasklib.rb
0.604 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
testtask.rb
5.549 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
thread_history_display.rb
1.106 KB
11 Oct 2013 9.35 PM
root / linksafe
0644
thread_pool.rb
4.776 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
trace_output.rb
0.53 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
version.rb
0.152 KB
15 Jul 2014 3.07 AM
root / linksafe
0644
win32.rb
1.551 KB
15 Jul 2014 3.07 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF