Examples of renameTo()


Examples of com.ibm.as400.access.IFSFile.renameTo()

      if (tempFile != null && renameBackTempFile)
      { // Reverse initial renaming of the destination file member
        // Reinitialise to allow backwards renaming
        destFile = new IFSFile(as400System, destFilename);
        // rename back temp member to destination member
        tempFile.renameTo(destFile);

        List params = new Vector();
        params.add(sourceFilename);
        params.add(destFilename);
        throw new XException(Constants.LOCATION_EXTERN,
View Full Code Here

Examples of com.orientechnologies.orient.core.storage.fs.OFileClassic.renameTo()

      final OFileClassic file = files.get(fileId);
      final String osFileName = file.getName();
      if (osFileName.startsWith(oldFileName)) {
        final File newFile = new File(storageLocal.getStoragePath() + File.separator + newFileName
            + osFileName.substring(osFileName.lastIndexOf(oldFileName) + oldFileName.length()));
        boolean renamed = file.renameTo(newFile);
        while (!renamed) {
          renamed = file.renameTo(newFile);
        }
      }
View Full Code Here

Examples of com.sun.enterprise.deployment.deploy.shared.AbstractArchive.renameTo()

            // if we were using a temp file, time to rewrite the original
            if (tmpName!=null) {
                AbstractArchive finalArchive = abstractArchiveFactory.openArchive(outPath);
                finalArchive.delete();
                AbstractArchive tmpArchive = abstractArchiveFactory.openArchive(tmpName);
                tmpArchive.renameTo(outPath);
            }      
        } catch (IOException ioe) {
            // cleanup
            if (out!=null) {
    try {
View Full Code Here

Examples of hudson.model.FreeStyleProject.renameTo()

            assertFalse(f.getOriginal().getName().equals(oldUpstreamName));
        }
        
        // Verify that usage entry in fingerprint record is changed after
        // sink project is renamed
        downstream.renameTo(renamedProject2);
        upstream.renameTo(renamedProject1);
        action = upstreamBuild.getAction(Fingerprinter.FingerprintAction.class);
        assertNotNull(action);
        fingerprints = action.getFingerprints().values();
        for (Fingerprint f: fingerprints) {
View Full Code Here

Examples of hudson.model.Project.renameTo()

    assertNotNull("builder should record environment", builder.getEnvVars());
    assertEquals("value", builder.getEnvVars().get("KEY"));

                // Now rename projectB and confirm projectA's build trigger is updated automatically:
                projectB.renameTo("new-projectB");
                assertEquals("rename in trigger", "new-projectB", projectA.getPublishersList()
                             .get(BuildTrigger.class).getConfigs().get(0).getProjects());

                // Now delete projectB and confirm projectA's build trigger is updated automatically:
                projectB.delete();
View Full Code Here

Examples of io.fathom.cloud.blobs.TempFile.renameTo()

        String name = System.currentTimeMillis() + "_" + UUID.randomUUID().toString();

        try (TempFile tempFile = new TempFile(new File(tmpDir, name))) {
            Files.write(data, tempFile.getFile());

            tempFile.renameTo(new File(queueDir, name));
        }
    }

}
View Full Code Here

Examples of io.fathom.cloud.sftp.RemoteTempFile.renameTo()

                    if (atomic) {
                        if (sudo) {
                            throw new UnsupportedOperationException("Atomic sudo move not yet implemented");
                        }

                        tempFile.renameTo(new RemoteFile(dest));
                    } else {
                        ShellCommand command = ShellCommand.create("/bin/cp");

                        command.arg(remoteDest);
                        command.arg(dest);
View Full Code Here

Examples of java.io.File.renameTo()

          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, "renaming '" + name
                + "' to conform with versioning system"));

          jar_file.renameTo( new File( jar_file.getParent(), "i18nAZ_0.1.jar  " ));

          continue;
        }
      }
View Full Code Here

Examples of java.io.File.renameTo()

              + "] ===> [" + temp_user_path + "]";
          System.out.println(msg);
          Logger.log(new LogEvent(LOGID,
              "SystemProperties::getUserPath(Unix): " + msg));
          try {
            old_home.renameTo(home);
          } catch (Throwable t) {
            t.printStackTrace();
            Logger.log(new LogEvent(LOGID, "migration rename failed:", t));
          }
        }
View Full Code Here

Examples of java.io.File.renameTo()

         fos = null;

         //delete the old file
         if ( !oldFile.exists() || oldFile.delete() ) {
            //rename the new one
            newFile.renameTo(oldFile);
         }

      }
      catch (Exception e) {
        Debug.printStackTrace( e );
View Full Code Here
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.