You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/02/09 10:06:02 UTC

[2/2] camel git commit: Add javadoc

Add javadoc


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3456700d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3456700d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3456700d

Branch: refs/heads/master
Commit: 3456700d217c4b5e1b0b90724852865a284b2372
Parents: 8d56247
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Feb 9 10:57:15 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Feb 9 11:05:48 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/util/FileUtil.java    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3456700d/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
index fee4be4..07f64a8 100644
--- a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
+++ b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
@@ -522,6 +522,13 @@ public final class FileUtil {
         return true;
     }
 
+    /**
+     * Copies the file
+     *
+     * @param from  the source file
+     * @param to    the destination file
+     * @throws IOException If an I/O error occurs during copy operation
+     */
     public static void copyFile(File from, File to) throws IOException {
         FileChannel in = null;
         FileChannel out = null;
@@ -543,6 +550,14 @@ public final class FileUtil {
         }
     }
 
+    /**
+     * Deletes the file.
+     * <p/>
+     * This implementation will attempt to delete the file up till three times with one second delay, which
+     * can mitigate problems on deleting files on some platforms such as Windows.
+     *
+     * @param file  the file to delete
+     */
     public static boolean deleteFile(File file) {
         // do not try to delete non existing files
         if (!file.exists()) {