APIdock / Ruby
/
method

cp

ruby latest stable - Class: Object
cp()
public

Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY

ruby -run -e cp  -- [OPTION] SOURCE DEST
-p preserve file attributes if possible
-r copy recursively
-v verbose
# File lib/un.rb, line 84
def cp
 setup("pr") do |argv, options|
 cmd = "cp"
 cmd += "_r" if options.delete :r
 options[:preserve] = true if options.delete :p
 dest = argv.pop
 argv = argv[0] if argv.size == 1
 FileUtils.send cmd, argv, dest, options
 end
end

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