Rename the given resource
320122
public boolean renameTo( Resource dest)
        throws SecurityException
    {
        if( dest instanceof FileResource)
            return _file.renameTo( ((FileResource)dest)._file);
        else
            return false;
    }
276015
def renamed(self, name):
        
        duplicate = copy(self)
        duplicate._name = name
        return duplicate
406202
public static base_response rename(nitro_service client, responderpolicy resource, String new_name) throws Exception {
		responderpolicy renameresource = new responderpolicy();
		renameresource.name = resource.name;
		return renameresource.rename_resource(client,new_name);
	}
483696
public static void rename(String from, String to) {
        try {
            Files.move(Paths.get(from), Paths.get(to), StandardCopyOption.REPLACE_EXISTING);
        } catch (IOException e) {
            log.error("Error renaming file", e);
        }
    }
465034
public static base_response rename(nitro_service client, nsacl6 resource, String new_acl6name) throws Exception {
		nsacl6 renameresource = new nsacl6();
		renameresource.acl6name = resource.acl6name;
		return renameresource.rename_resource(client,new_acl6name);
	}
54325
def rename(store, src_path, dst_path):
    """"""
    src_path = normalize_storage_path(src_path)
    dst_path = normalize_storage_path(dst_path)
    if hasattr(store, 'rename'):
        # pass through
        store.rename(src_path, dst_path)
    else:
        # slow version, delete one key at a time
        _rename_from_keys(store, src_path, dst_path)
304650
private void rename(String from, String to) throws IOException
   {
      IndexOutputStream out = null;
      IndexInputStream in = null;
      try
      {
         out = new IndexOutputStream(dir.createOutput(to));
         in = new IndexInputStream(dir.openInput(from));
         DirectoryHelper.transfer(in, out);
      }
      finally
      {
         if (in != null)
         {
            in.close();
         }

         if (out != null)
         {
            out.flush();
            out.close();
         }
      }
      try
      {
         // delete old one
         if (dir.fileExists(from))
         {
            dir.deleteFile(from);
         }
      }
      catch (IOException e)
      {
         // do noting. Will be removed later
         if (LOG.isTraceEnabled())
         {
            LOG.trace("Can't deleted file: " + e.getMessage());
         }
      }
   }
777394
def rename(path):
    """"""

    new_path = prompt(path)

    if path != new_path:
        try:
            from shutil import move
        except ImportError:
            from os import rename as move

        move(path, new_path)

    return new_path
689052
def rename(self, old_name, new_name):
        """"""
        try:
            self.api.rename(mkey(old_name), mkey(new_name))
        except ResponseError, exc:
            if "no such key" in exc.args:
                raise KeyError(old_name)
            raise
523903
def rename(client, old, new, force):
    """"""
    from renku.models.refs import LinkReference
    LinkReference(client=client, name=_ref(old)).rename(_ref(new), force=force)
195854
def rename(self, name):
        
        return self.client.api.rename(self.id, name)
706518
def rename(self, new_name):
        

        yield from self._hypervisor.send("nio rename {name} {new_name}".format(name=self._name, new_name=new_name))

        log.info("NIO {name} renamed to {new_name}".format(name=self._name, new_name=new_name))
        self._name = new_name
464081
def update(self, resource, rid, updates):
        
        if resource[-1] != '/':
            resource += '/'
        resource += str(rid)
        return self.put(resource, data=updates)
1307259
def rename(new_name)
      json_body = { :name => new_name }.to_json
      HTTParty.put(base_request_uri, :body => json_body)
      @name = new_name
    end
128080
def rename(oldPath, newPath, **kwargs):
    """"""
    import os
    return os.rename(oldPath, newPath, **kwargs)
1088863
def rename(self, name):
        
        if name is None:
            raise Exception("name (%s) not-valid" % (name,))
        self.prefix, self.name = splitPrefix(name)
98519
function rename(opts) {
    opts = opts || {};

    return through.obj(function (file, enc, cb) {
        file.path = opts.path;
        cb(null, file);
    });
}