Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Kaneta
Last active December 23, 2015 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kaneta/6582280 to your computer and use it in GitHub Desktop.
Save Kaneta/6582280 to your computer and use it in GitHub Desktop.
import java.io.File;
import java.io.IOException;
import com.google.common.io.Files;
public class FileCopy {
public static void main(String[] args) {
File original = new File("src/original.txt");
File newFile = new File("src/newfile.txt");
try {
Files.copy(original, newFile);
} catch (IOException e) {
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment