lib/blower/context.rb
# Copy a file or readable to the host filesystems.
# @overload cp(readable, to, as: user, on: hosts, quiet: false)
#   @param [#read] from An object from which to read the contents of the new file.
#   @param [String] to The file name to write the string to.
#   @macro onable
#   @macro asable
#   @macro quietable
#   @macro onceable
# @overload cp(filename, to, as: user, on: hosts, quiet: false)
#   @param [String] from The name of the local file to copy.
#   @param [String] to The file name to write the string to.
#   @macro onable
#   @macro asable
#   @macro quietable
#   @macro onceable
Copy a file or readable to the host filesystems.
Copy a file or readable to the host filesystems .
def cp (from, to, as: user, on: hosts, quiet: false, once: nil, delete: false)
      self.once once, quiet: quiet do
        log.info "cp: #{from} -> #{to}", quiet: quiet do
          Dir.chdir File.dirname(file) do
            hash_map(hosts) do |host|
              host.cp from, to, as: as, quiet: quiet, delete: delete
            end
          end
        end
      end
    end
def cp ( from , to , as : user , on : hosts , quiet : false , once : nil , delete : false ) self . once once , quiet : quiet do log . info "cp: #{from} -> #{to}" , quiet : quiet do Dir . chdir File . dirname ( file ) do hash_map ( hosts ) do | host | host . cp from , to , as : as , quiet : quiet , delete : delete end end end end end
Copy a file or readable to the host filesystems.
Copy a file or readable to the host filesystems .
from
<not_specific>
to
<not_specific>
as
<not_specific>
user
<not_specific>
on
<not_specific>
hosts
<not_specific>
quiet
<not_specific>
once
<not_specific>
delete
<not_specific>
overload
cp(readable, to, as: user, on: hosts, quiet: false) @param [#read] from An object from which to read the contents of the new file. @param [String] to The file name to write the string to.
cp ( readable to as : user on : hosts quiet : false ) @param [ #read ] from An object from which to read the contents of the new file . @param [ String ] to The file name to write the string to .
overload
cp(filename, to, as: user, on: hosts, quiet: false) @param [String] from The name of the local file to copy. @param [String] to The file name to write the string to.
cp ( filename to as : user on : hosts quiet : false ) @param [ String ] from The name of the local file to copy . @param [ String ] to The file name to write the string to .