module
Importance_3
Ruby latest stable (v2_5_5) - 0 notes
  • 1_8_6_287
  • 1_8_7_72
  • 1_8_7_330
  • 1_9_1_378
  • 1_9_2_180
  • 1_9_3_125
  • 1_9_3_392
  • 2_1_10
  • 2_2_9
  • 2_4_6
  • 2_5_5
  • 2_6_3 (0)
  • What's this?

Module not available on this version

This module is only available on newer versions. The first available version of the module is shown here.

frozen_string_literal: true

fileutils.rb

Copyright © 2000-2007 Minero Aoki

This program is free software. You can distribute/modify this program under the same terms of ruby.

module Bundler::FileUtils

Namespace for several file utility methods for copying, moving, removing, etc.

Module Functions

require 'bundler/vendor/fileutils/lib/fileutils'

Bundler::FileUtils.cd(dir, options)
Bundler::FileUtils.cd(dir, options) {|dir| block }
Bundler::FileUtils.pwd()
Bundler::FileUtils.mkdir(dir, options)
Bundler::FileUtils.mkdir(list, options)
Bundler::FileUtils.mkdir_p(dir, options)
Bundler::FileUtils.mkdir_p(list, options)
Bundler::FileUtils.rmdir(dir, options)
Bundler::FileUtils.rmdir(list, options)
Bundler::FileUtils.ln(target, link, options)
Bundler::FileUtils.ln(targets, dir, options)
Bundler::FileUtils.ln_s(target, link, options)
Bundler::FileUtils.ln_s(targets, dir, options)
Bundler::FileUtils.ln_sf(target, link, options)
Bundler::FileUtils.cp(src, dest, options)
Bundler::FileUtils.cp(list, dir, options)
Bundler::FileUtils.cp_r(src, dest, options)
Bundler::FileUtils.cp_r(list, dir, options)
Bundler::FileUtils.mv(src, dest, options)
Bundler::FileUtils.mv(list, dir, options)
Bundler::FileUtils.rm(list, options)
Bundler::FileUtils.rm_r(list, options)
Bundler::FileUtils.rm_rf(list, options)
Bundler::FileUtils.install(src, dest, options)
Bundler::FileUtils.chmod(mode, list, options)
Bundler::FileUtils.chmod_R(mode, list, options)
Bundler::FileUtils.chown(user, group, list, options)
Bundler::FileUtils.chown_R(user, group, list, options)
Bundler::FileUtils.touch(list, options)

The options parameter is a hash of options, taken from the list :force, :noop, :preserve, and :verbose. :noop means that no changes are made. The other three are obvious. Each method documents the options that it honours.

All methods that have the concept of a “source” file or directory can take either one file or a list of files in that argument. See the method documentation for examples.

There are some `low level’ methods, which do not accept any option:

Bundler::FileUtils.copy_entry(src, dest, preserve = false, dereference = false)
Bundler::FileUtils.copy_file(src, dest, preserve = false, dereference = true)
Bundler::FileUtils.copy_stream(srcstream, deststream)
Bundler::FileUtils.remove_entry(path, force = false)
Bundler::FileUtils.remove_entry_secure(path, force = false)
Bundler::FileUtils.remove_file(path, force = false)
Bundler::FileUtils.compare_file(path_a, path_b)
Bundler::FileUtils.compare_stream(stream_a, stream_b)
Bundler::FileUtils.uptodate?(file, cmp_list)

module Bundler::FileUtils::Verbose

This module has all methods of Bundler::FileUtils module, but it outputs messages before acting. This equates to passing the :verbose flag to methods in Bundler::FileUtils.

module Bundler::FileUtils::NoWrite

This module has all methods of Bundler::FileUtils module, but never changes files/directories. This equates to passing the :noop flag to methods in Bundler::FileUtils.

module Bundler::FileUtils::DryRun

This module has all methods of Bundler::FileUtils module, but never changes files/directories. This equates to passing the :noop and :verbose flags to methods in Bundler::FileUtils.

Constants

METHODS = singleton_methods() - [:private_module_function, :commands, :options, :have_option?, :options_of, :collect_method]

LOW_METHODS = singleton_methods(false) - collect_method(:noop).map(&:intern)

OPT_TABLE = {}

Attributes

Show files where this module is defined (1 file)
Register or log in to add new notes.