Here you can find the source of writeUntouchedImage(Path sourceFile, Path destFile)
Parameter | Description |
---|---|
sourceFile | - file to read from |
destFile | - file to write to |
Parameter | Description |
---|---|
IOException | when IO Exception occurs. |
private static void writeUntouchedImage(Path sourceFile, Path destFile) throws IOException
//package com.java2s; /*/* w w w .j a v a 2s .c om*/ * CKFinder * ======== * http://cksource.com/ckfinder * Copyright (C) 2007-2015, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. */ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; public class Main { /** * writes unchanged file to disk. * * @param sourceFile - file to read from * @param destFile - file to write to * @throws IOException when IO Exception occurs. */ private static void writeUntouchedImage(Path sourceFile, Path destFile) throws IOException { Files.copy(sourceFile, destFile, StandardCopyOption.REPLACE_EXISTING); } }