Copies over the handl to the destination

        Args:
            handle (str): path to copy over
            dest (str): path to copy to

        Returns:
            None
483297
def download_image(self, handle, dest):
        
        shutil.copyfile(self._prefixed(handle), dest)
1174298
function copyFile (src, dest) {
  return new Promise((resolve, reject) => {
    const read = fs.createReadStream(src);
    read.on('error', reject);
    const write = fs.createWriteStream(dest);
    write.on('error', reject);
    write.on('finish', resolve);
    read.pipe(write);
  })
}
7975
function copy(source, destination, callback) {
  cp(source, destination, {overwrite: true}, function done(err) {
    if (err) callback(err)
    else callback()
  })
}
78288
def putSubHandler(self, prefix, handler):
        '''
        '''
        self.subHandlers[prefix] = handler
        handler._parent = self
        return self
520537
def unhandle(self, handler):
        
        h, _, _ = self._extract(handler)
        key = hash(h)
        with self._hlock:
            if key not in self.handlers:
                raise ValueError('Handler "%s" was not found' % str(h))
            handlers = self.handlers.copy()
            del handlers[key]
            self.handlers = handlers
        return self
227055
def CloseHandle(self):
        ''''''
        if hasattr(self, 'handle'):
            ret = vmGuestLib.VMGuestLib_CloseHandle(self.handle.value)
            if ret != VMGUESTLIB_ERROR_SUCCESS: raise VMGuestLibException(ret)
            del(self.handle)
1315782
def _gzip_open_handle(handle):
    """""""
    import gzip
    if sys.version_info[0] > 2:
        import io
        handle = io.TextIOWrapper(gzip.GzipFile(fileobj=handle), encoding="UTF-8")
    else:
        handle = gzip.GzipFile(fileobj=handle)
    return handle
302347
def _get_file(handle):
    ''''''
    if not isinstance(handle, IOBase):
        return handle

    fd, temp_file = tempfile.mkstemp(str(uuid.uuid4()), prefix='neurom-')
    os.close(fd)
    with open(temp_file, 'w') as fd:
        handle.seek(0)
        shutil.copyfileobj(handle, fd)
    return temp_file
583394
def copyFile(src, dest):
    
    #Src Exists?
    try:
        if os.path.isfile(src):
            dpath, dfile = os.path.split(dest)

            if not os.path.isdir(dpath):
                os.makedirs(dpath)

            if not os.path.exists(dest):
                touch(dest)
            try:
                shutil.copy2(src, dest)
            # eg. src and dest are the same file
            except shutil.Error as e:
                logging.exception('Error: %s' % e)
            # eg. source or destination doesn't exist
            except IOError as e:
                logging.exception('Error: %s' % e.strerror)
    except:
        logging.exception('Error: src to copy does not exist.')
739159
def Copy(From, To):
    
    from benchbuild.utils.cmd import cp
    cp("-ar", "--reflink=auto", From, To)
524263
def copy(self):
		
		out = self._from_iterable(None)
		out._dict = self._dict.copy()
		out._size = self._size
		return out
1145944
def recursive_copy(source, dest):
    '''
    
    '''
    for root, _, files in salt.utils.path.os_walk(source):
        path_from_source = root.replace(source, '').lstrip(os.sep)
        target_directory = os.path.join(dest, path_from_source)
        if not os.path.exists(target_directory):
            os.makedirs(target_directory)
        for name in files:
            file_path_from_source = os.path.join(source, path_from_source, name)
            target_path = os.path.join(target_directory, name)
            shutil.copyfile(file_path_from_source, target_path)
1239842
def copy(self, dest):
        
        if os.path.isfile(self.path):
            shutil.copy2(self.path, dest)
        else:
            shutil.copytree(self.path, dest, symlinks=False, ignore=None)
882026
private HDFSSegmentHandle asWritableHandle(SegmentHandle handle) {
        Preconditions.checkArgument(!handle.isReadOnly(), "handle must not be read-only.");
        return asReadableHandle(handle);
    }
892668
def copy(path, destination, options = {})
      opts = options.nil? ? {} : options.dup
      opts[:headers] = options[:headers].nil? ? {} : options[:headers].dup
      opts[:headers]['Destination'] = destination
      execute('COPY', path, opts)
    end
505732
def del_handler(self, handle):
        
        _, _, _, respondent = self._handle_map.pop(handle)
        if respondent:
            self._handles_by_respondent[respondent].discard(handle)
331983
def file_handler(self, handler_type, path, prefixed_path, source_storage):
        
        if self.faster:
            if prefixed_path not in self.found_files:
                self.found_files[prefixed_path] = (source_storage, path)

            self.task_queue.put({
                'handler_type': handler_type,
                'path': path,
                'prefixed_path': prefixed_path,
                'source_storage': source_storage
            })
            self.counter += 1
        else:
            if handler_type == 'link':
                super(Command, self).link_file(path, prefixed_path, source_storage)
            else:
                super(Command, self).copy_file(path, prefixed_path, source_storage)