Examples of rename()


Examples of org.openide.filesystems.FileObject.rename()

                fileObject.delete();

                //Rename temp file
                FileObject tempFileObject = FileUtil.toFileObject(writeFile);
                FileLock lock = tempFileObject.lock();
                tempFileObject.rename(lock, name, ext);
                lock.releaseLock();
            } else if (cancel) {
                //Delete temp file
                FileObject tempFileObject = FileUtil.toFileObject(writeFile);
                tempFileObject.delete();

Examples of org.terrier.utility.io.FileSystem.rename()

    final FileSystem destFS = getFileSystem(destFilename);
    final FileSystem sourceFS = getFileSystem(sourceFilename);
    try{
      if (destFS == sourceFS)//yes, that's object equals
      {
        sourceFS.rename(sourceFilename, destFilename);
      }
      else
      {
        copyFile(sourceFS.openFileStream(sourceFilename), destFS.writeFileStream(destFilename));
        sourceFS.delete(sourceFilename);

Examples of railo.runtime.type.Query.rename()

    int len=qry.getRecordcount();

    if(qry.getColumn(COLUMN_DEF,null) != null)
      qry.rename(COLUMN_DEF,COLUMN_DEFAULT_VALUE);
    else if(qry.getColumn(COLUMN_DEFAULT,null) != null)
      qry.rename(COLUMN_DEFAULT,COLUMN_DEFAULT_VALUE);
   
    // make sure decimal digits exists
    QueryColumn col = qry.getColumn(DECIMAL_DIGITS,null);
    if(col==null){
      Array arr=new ArrayImpl();

Examples of railo.runtime.type.QueryImpl.rename()

            pageContext.getTimeZone());
       
    int len=qry.getRecordcount();

    if(qry.getColumn(COLUMN_DEF,null) != null)
      qry.rename(COLUMN_DEF,COLUMN_DEFAULT_VALUE);
    else if(qry.getColumn(COLUMN_DEFAULT,null) != null)
      qry.rename(COLUMN_DEFAULT,COLUMN_DEFAULT_VALUE);
   
    // make sure decimal digits exists
    QueryColumn col = qry.getColumn(DECIMAL_DIGITS,null);

Examples of redis.clients.jedis.Pipeline.rename()

                    // get the last zunionstore output, which is the number of
                    // elements in the result
                    count = (Long) execute.get(execute.size() - 3);
                } else {
                    pipeline.del(tmpkey);
                    pipeline.rename(rkey, rkeyCached);
                    pipeline.expire(rkeyCached, cache);
                    pipeline.del(rkey);
                    List<Object> execute = pipeline.execute();
                    // get zrange or zrevrange result
                    rawresult = (List<byte[]>) execute.get(execute.size() - 5);

Examples of redis.clients.jedis.Transaction.rename()

    try {
      Set<String> oldKeys = jedis.keys(oldRepository.name + ":*");
      Transaction t = jedis.multi();
      for (String oldKey : oldKeys) {
        String newKey = newRepository.name + oldKey.substring(oldKey.indexOf(':'));
        t.rename(oldKey, newKey);
      }
      t.exec();
      success = true;
    } catch (JedisException e) {
      log.error("failed to rename tickets in Redis @ " + getUrl(), e);

Examples of simpleserver.nbt.NBTCompound.rename()

      return invites.contains(new NBTString(player.getName()));
    }

    public NBTCompound tag() {
      NBTCompound tag = position.tag();
      tag.rename(HOME);
      NBTByte publicValue = new NBTByte(PUBLIC, isPublic ? (byte) 1 : (byte) 0);
      tag.put(publicValue);
      tag.put(invites);
      return tag;
    }

Examples of tachyon.UnderFileSystem.rename()

    imageOs.flush();
    imageOs.close();

    LOG.info("Succefully created the image file: " + tPath);
    ufs.delete(path, false);
    ufs.rename(tPath, path);
    ufs.delete(tPath, false);
    LOG.info("Renamed " + tPath + " to " + path);
    // safe to close, nothing created here with scope outside function
    ufs.close();
  }

Examples of tachyon.client.TachyonFS.rename()

      return -1;
    }
    TachyonURI srcPath = new TachyonURI(argv[1]);
    TachyonURI dstPath = new TachyonURI(argv[2]);
    TachyonFS tachyonClient = createFS(srcPath);
    if (tachyonClient.rename(srcPath, dstPath)) {
      System.out.println("Renamed " + srcPath + " to " + dstPath);
      return 0;
    } else {
      return -1;
    }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.