Method: ShellHelpers::PathnameExt::Base#copy_entry

Defined in:
lib/shell_helpers/pathname.rb

#copy_entry(dest, dereference: false, preserve: true) ⇒ Object

use the low level FileUtils feature to copy the metadata if passed a dir just copy the dir metadata, not the directory recursively Note this differs from FileUtils.copy_entry who copy directories recursively



48
49
50
51
52
53
# File 'lib/shell_helpers/pathname.rb', line 48

def copy_entry(dest, dereference: false, preserve: true)
	require 'fileutils'
	ent = FileUtils::Entry_.new(@path, nil, dereference)
	ent.copy dest.to_s
	ent. dest.to_s if preserve
end