Java Rename File renameDirectory(String newDir, String oldDir)

Here you can find the source of renameDirectory(String newDir, String oldDir)

Description

rename Directory

License

Open Source License

Declaration

static public void renameDirectory(String newDir, String oldDir) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    static public void renameDirectory(String newDir, String oldDir) {
        File ofile = new File(oldDir);
        File nfile = new File(newDir);
        ofile.renameTo(nfile);/*from   w  ww. jav  a  2s .c  o  m*/
    }
}

Related

  1. renameCanDelete()
  2. renameContigs(File aliasFile, File cytobandFile, File seqDir)
  3. renameDirectory(File directory, File newDirectory)
  4. renameDirectory(File fromDir, File toDir)
  5. renameDirectory(String in_currentDirectoryPath, String in_newDirectoryPath)
  6. renameExcludedFiles(File existingBinaryFolder, Collection excludedBids)
  7. renameExistingWithRetries(final File fromFile, final File toFile)
  8. renameFile(File src, File dest)
  9. renameFile(String source, String dest)