Here you can find the source of move(File from, File to)
public static void move(File from, File to) throws IOException
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.StandardCopyOption; public class Main { public static void move(File from, File to) throws IOException { copyFile(from, to);/* www . jav a 2 s . c o m*/ from.delete(); } public static void copyFile(File src, File dst) throws IOException { Files.copy(src.toPath(), dst.toPath(), StandardCopyOption.REPLACE_EXISTING); } }