Skip to content

Instantly share code, notes, and snippets.

@angiejones
Created Jan 28, 2019
Embed
What would you like to do?
Move downloaded file to test directory
public static boolean moveFile(File file, String destination){
File existingFile = new File(destination);
if(existingFile.exists()){
existingFile.delete();
}
return file.renameTo(new File(destination));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment