Java File Copy nio copy(File copied, File destination)

Here you can find the source of copy(File copied, File destination)

Description

copy

License

Open Source License

Declaration

public static void copy(File copied, File destination) throws Exception 

Method Source Code

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

import java.io.File;

import java.io.IOException;
import java.nio.file.Files;

public class Main {
    public static void copy(File copied, File destination) throws Exception {
        try {//w  w  w .j av a 2 s  .c  om
            Files.copy(copied.toPath(), destination.toPath());
        } catch (IOException e) {
            throw new Exception(copied.toString() + ": Can't copy");
        }
    }
}

Related

  1. copy(File a, File b)
  2. copy(File base_path, File in, File out)
  3. copy(File file, File toDirectory)
  4. copy(File from, File to)
  5. copy(File from, File to)
  6. copy(File from, File to)