class Pathutil
def safe_copy_file(to, root: nil)
def safe_copy_file(to, root: nil) raise Errno::EPERM, "#{self} not in #{root}" unless in_path?(root) FileUtils.cp(self, to, { :preserve => true }) end
def safe_copy_file(to, root: nil) raise Errno::EPERM, "#{self} not in #{root}" unless in_path?(root) FileUtils.cp(self, to, { :preserve => true }) end