APIdock / Ruby
/
method

install

ruby latest stable - Class: Object
install()
public

Copy SOURCE to DEST.

ruby -run -e install  -- [OPTION] SOURCE DEST
-p apply access/modification times of SOURCE files to
 corresponding destination files
-m set permission mode (as in chmod ), instead of 0755
-o set owner user id , instead of the current owner
-g set owner group id , instead of the current group
-v verbose
# File lib/un.rb, line 197
def install
 setup("pm:o:g:") do |argv, options|
 (mode = options.delete :m) and options[:mode] = /\A\d/ =~ mode ? mode.oct : mode
 options[:preserve] = true if options.delete :p
 (owner = options.delete :o) and options[:owner] = owner
 (group = options.delete :g) and options[:group] = group
 dest = argv.pop
 argv = argv[0] if argv.size == 1
 FileUtils.install argv, dest, options
 end
end

AltStyle によって変換されたページ (->オリジナル) /