Java Rename File rename(String was_name, String new_name)

Here you can find the source of rename(String was_name, String new_name)

Description

rename

License

Open Source License

Declaration

public static boolean rename(String was_name, String new_name) 

Method Source Code


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

import java.io.*;

public class Main {
    public static boolean rename(String was_name, String new_name) {
        File was_file = new File(was_name);
        File new_file = new File(new_name);
        System.err.println(/*from   w  w  w  .j  a  v  a  2  s  .  c  o  m*/
                "[IOUtils] renaming: " + was_file.getAbsolutePath() + " to: " + new_file.getAbsolutePath());
        return was_file.renameTo(new_file);
    }
}

Related

  1. rename(String platformLibPath, String newPath)
  2. reName(String s, String s1)
  3. rename(String srcFilename, String destFilename)
  4. rename(String srcPath, String destPath)
  5. rename(String strFileName, String strRenameToName)
  6. rename_file_to_file(String n1, String n2)
  7. renameBackup(File backupFile)
  8. renameCanDelete()
  9. renameContigs(File aliasFile, File cytobandFile, File seqDir)