package sample;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class CopyExample1 {
public static void main(String[] args) throws Exception {
Path source = Paths.get("foo/bar/note.txt");
Path target = Paths.get("temp/bar/note.txt");
Files.copy(source, target);
}
}