List of utility methods to do Rename File
void | rename(final String src, final String dst) Renames the file with the given name new File(src).renameTo(new File(dst)); |
void | rename(String existingFile, String newFilename) rename if (exists(existingFile)) { File oldFile = new File(existingFile); oldFile.renameTo(new File(newFilename)); |
boolean | rename(String fileName, String distFile) rename synchronized (fileName) { File oldFile = new File(fileName); if (oldFile.exists()) { try { oldFile.renameTo(new File(distFile)); return true; } catch (Exception e) { e.printStackTrace(); ... |
boolean | rename(String from, String to) rename File fFrom = new File(from); File fTo = new File(to); if (!fFrom.exists()) { return false; } else { return fFrom.renameTo(fTo); |
boolean | rename(String oldFile, String newFile) rename File old = new File(oldFile); return old.renameTo(new File(newFile)); |
boolean | rename(String oldName, String newName) Renames a file or directory. File fold = new File(oldName); File fnew = new File(newName); return fold.renameTo(fnew); |
void | reName(String oldName, String newName) re Name File oldF = new File(oldName); File newF = new File(newName); boolean renameTo = oldF.renameTo(newF); if (!renameTo) { return; |
void | rename(String platformLibPath, String newPath) rename new File(platformLibPath).renameTo(new File(newPath)); |
void | reName(String s, String s1) re Name File file1 = new File(s); if (file1.exists()) { file1.renameTo(new File(s1)); |
boolean | rename(String srcFilename, String destFilename) renames a file to the new filename File srcFile; File destFile; boolean result = false; srcFile = new File(srcFilename); destFile = new File(destFilename); try { result = srcFile.renameTo(destFile); } catch (Exception e) { ... |