public static void copyFile(File sourceFile, File destFile) throws HyscaleException {
		if (sourceFile == null || !sourceFile.exists()) {
			String[] args = new String[] { sourceFile != null ? sourceFile.getName() : NULL_STRING };
			throw new HyscaleException(CommonErrorCode.FILE_NOT_FOUND, args);
		}
		if (destFile == null) {
			throw new HyscaleException(CommonErrorCode.DIRECTORY_REQUIRED_TO_COPY_FILE, sourceFile.getName());
		}
		// Create parent dirs
		destFile.getParentFile().mkdirs();
		try {
			FileUtils.copyFile(sourceFile, destFile);
		} catch (IOException e) {
			throw new HyscaleException(e, CommonErrorCode.FAILED_TO_COPY_FILE, sourceFile.getName());
		}
	}
Copy file to destination file Create parent directory if does not exist
commons/src/main/java/io/hyscale/commons/io/HyscaleFilesUtil.java