Examples of renameTo()


Examples of org.glassfish.api.deployment.archive.ReadableArchive.renameTo()

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

Examples of org.hornetq.core.journal.SequentialFile.renameTo()

            SequentialFile file = fileFactory.createSequentialFile(newFile, 1);
            if (file.exists())
            {
               final String originalName = file.getFileName();
               final String newName = originalName.substring(0, originalName.lastIndexOf(".cmp"));
               file.renameTo(newName);
            }
         }

         for (Pair<String, String> rename : renames)
         {
View Full Code Here

Examples of playRepository.PlayRepository.renameTo()

        if (StringUtils.isNotEmpty(defaultBranch)) {
            repository.setDefaultBranch(defaultBranch);
        }

        if (!project.name.equals(updatedProject.name)) {
            if (!repository.renameTo(updatedProject.name)) {
                throw new FileOperationException("fail repository rename to " + project.owner + "/" + updatedProject.name);
            }
        }

        updatedProject.update();
View Full Code Here

Examples of railo.commons.io.res.Resource.renameTo()

             
                Resource to=parent.getRealResource(name+"."+StringUtil.addZeros(i, lenMaxFileSize)+".bak");
                Resource from=parent.getRealResource(name+"."+StringUtil.addZeros(i-1,lenMaxFileSize)+".bak");
                if(from.exists()) {
                    if(to.exists())to.delete();
                    from.renameTo(to);
                }
            }
            res.renameTo(parent.getRealResource(name+"."+StringUtil.addZeros(1,lenMaxFileSize)+".bak"));
            res=parent.getRealResource(name);//new File(parent,name);
            res.createNewFile();
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.