Java Rename File rename(String oldFile, String newFile)

Here you can find the source of rename(String oldFile, String newFile)

Description

rename

License

MIT License

Declaration

public static boolean rename(String oldFile, String newFile) 

Method Source Code

//package com.java2s;
/*/*w ww.  ja v a 2  s. c o  m*/
 * Copyright 2010-2011, Sikuli.org
 * Released under the MIT License.
 *
 */

import java.io.*;

public class Main {
    public static boolean rename(String oldFile, String newFile) {
        File old = new File(oldFile);
        return old.renameTo(new File(newFile));
    }
}

Related

  1. rename(File srcFile, String newName)
  2. rename(final String src, final String dst)
  3. rename(String existingFile, String newFilename)
  4. rename(String fileName, String distFile)
  5. rename(String from, String to)
  6. rename(String oldName, String newName)
  7. reName(String oldName, String newName)
  8. rename(String platformLibPath, String newPath)
  9. reName(String s, String s1)