Rename key ``src`` to ``dst``
359406
def rename(self, src, dst):
        
        with self.pipe as pipe:
            return pipe.rename(self.redis_key(src), self.redis_key(dst))
313458
function(src, dst) {
    dst = dst || {};

    // Remove any properties in destination that were not
    // returned from the source
    forEach(dst, function (value, key) {
        if(!src.hasOwnProperty(key) && key.charAt(0) !== '$') {
            delete dst[key];
        }
    });

    for(var key in src) {

        if(src.hasOwnProperty(key) && key.charAt(0) !== '$')  {
            // For properties common to both source and destination,
            // check for object references and recurse as needed. Route around
            // arrays to prevent value/order inconsistencies
            if(angular.isObject(src[key]) && !angular.isArray(src[key])) {
                dst[key] = shallowClearAndCopy(src[key], dst[key]);
            } else {
                // Not an object, so just overwrite with value from source
                dst[key] = src[key];
            }
        }
    }

    return dst;
}
379537
def convert_to_relative_paths(src, dst):
    
    result = Smother.convert_to_relative_paths(Smother.load(src))
    result.write(dst)
282813
public boolean rename (Path src, Path dst) throws IOException {
    try (Closeable context =  new TimerContextWithLog(renameTimer.time(), "rename", src, dst)) {
      return super.rename(src, dst);
    }
  }
905432
def safe_concurrent_rename(src, dst):
  
  # Delete dst, in case it existed (with old content) even before any concurrent processes
  # attempted this write. This ensures that at least one process writes the new content.
  if os.path.isdir(src):  # Note that dst may not exist, so we test for the type of src.
    safe_rmtree(dst)
  else:
    safe_delete(dst)
  try:
    shutil.move(src, dst)
  except IOError as e:
    if e.errno != errno.EEXIST:
      raise
796575
private boolean rename(String src, String dst) throws IOException {
    IOException te = null;
    FileSystem hdfs = getFs();
    RetryPolicy retryPolicy = new CountingRetry(MAX_TRY);
    while (retryPolicy.attempt()) {
      try {
        return hdfs.rename(new Path(src), new Path(dst));
      } catch (IOException e) {
        LOG.warn("{} try to rename {} to {} : {}", retryPolicy.getAttemptCount(), src, dst,
            e.getMessage());
        te = e;
      }
    }
    throw te;
  }
1054114
def _copy(src, dst):
    """"""
    try:
        shutil.copy(src, dst)
    except IsADirectoryError:
        if os.path.isdir(dst):
            dst = os.path.join(dst, os.path.basename(src))
        shutil.copytree(src, dst)
103610
function copy (src, dst) {
  return new Promise((resolve, reject) => {
    fs.createReadStream(src)
      .on('error', reject)
      .pipe(fs.createWriteStream(dst)
              .on('error', reject)
              .on('close', resolve)
      )
  })
}
1129365
def copy_or_replace(src, dst):
    '''
    '''
    try:
        shutil.copy(src, dst)
    except (OSError, IOError), e:
        # It's possible that the file existed, but was owned by someone
        # else - in that situation, shutil.copy might then fail when it
        # tries to copy perms.
        # However, it's possible that we have write perms to the dir -
        # in which case, we can just delete and replace
        import errno

        if e.errno == errno.EPERM:
            import tempfile
            # try copying into a temporary location beside the old
            # file - if we have perms to do that, we should have perms
            # to then delete the old file, and move the new one into
            # place
            if os.path.isdir(dst):
                dst = os.path.join(dst, os.path.basename(src))

            dst_dir, dst_name = os.path.split(dst)
            dst_temp = tempfile.mktemp(prefix=dst_name + '.', dir=dst_dir)
            shutil.copy(src, dst_temp)
            if not os.path.isfile(dst_temp):
                raise RuntimeError(
                    "shutil.copy completed successfully, but path"
                    " '%s' still did not exist" % dst_temp)
            os.remove(dst)
            shutil.move(dst_temp, dst)
1049630
def rename_source_file(self, src, dst):
        
        try:
            os.rename(self.source_msgs_dir.joinpath(src), self.source_msgs_dir.joinpath(dst))
        except OSError:
            pass
184277
def movetree(src, dst):
    
    try:
        shutil.move(src, dst)
    except:
        copytree(src, dst, symlinks=True, hardlinks=True)
        shutil.rmtree(src)
1334519
public boolean rename(Path src, Path dst) throws IOException {
    if (fs.isDirectory(src)) {
      return fs.rename(src, dst);
    } else {

      boolean value = fs.rename(src, dst);
      if (!value)
        return false;

      Path checkFile = getChecksumFile(src);
      if (fs.exists(checkFile)) { //try to rename checksum
        if (fs.isDirectory(dst)) {
          value = fs.rename(checkFile, dst);
        } else {
          value = fs.rename(checkFile, getChecksumFile(dst));
        }
      }

      return value;
    }
  }
361224
def copy(src, dst):
    
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    copyfile(src, dst)
    copymode(src, dst)
476690
def move(self, src, dst):
        
        url = '/'.join([src.drive,
                        'api/move',
                        str(src.relative_to(src.drive)).rstrip('/')])

        params = {'to': str(dst.relative_to(dst.drive)).rstrip('/')}

        text, code = self.rest_post(url,
                                    params=params,
                                    auth=src.auth,
                                    verify=src.verify,
                                    cert=src.cert)

        if code not in [200, 201]:
            raise RuntimeError("%s" % text)
91324
async def renamenx(self, src, dst):
        
        if not await self.exists(dst):
            return await self.rename(src, dst)

        return False
989534
public boolean rename(Path src, Path dst) throws IOException {
    return fs.rename(src, dst);
  }
72341
def dst_to_src(self, dst_file):
        """"""
        for map in self.mappings:
            src_uri = map.dst_to_src(dst_file)
            if (src_uri is not None):
                return(src_uri)
        # Must have failed if loop exited
        raise MapperError(
            "Unable to translate destination path (%s) "
            "into a source URI." % (dst_file))