You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/07/12 16:04:49 UTC

svn commit: r793352 - in /camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote: FtpOperations.java SftpOperations.java

Author: ningjiang
Date: Sun Jul 12 14:04:49 2009
New Revision: 793352

URL: http://svn.apache.org/viewvc?rev=793352&view=rev
Log:
Fixed the build error of the recent change of camel-file component

Modified:
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java?rev=793352&r1=793351&r2=793352&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java Sun Jul 12 14:04:49 2009
@@ -303,7 +303,7 @@
 
         // if an existing file already exists what should we do?
         if (endpoint.getFileExist() == GenericFileExist.Ignore || endpoint.getFileExist() == GenericFileExist.Fail) {
-            boolean existFile = existFile(name);
+            boolean existFile = existsFile(name);
             if (existFile && endpoint.getFileExist() == GenericFileExist.Ignore) {
                 // ignore but indicate that the file was written
                 if (LOG.isTraceEnabled()) {
@@ -329,7 +329,7 @@
         }
     }
 
-    private boolean existFile(String name) {
+    public boolean existsFile(String name) throws GenericFileOperationFailedException {
         // check whether a file already exists
         String directory = FileUtil.onlyPath(name);
         if (directory == null) {
@@ -407,4 +407,5 @@
 
         return success;
     }
+    
 }

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java?rev=793352&r1=793351&r2=793352&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java Sun Jul 12 14:04:49 2009
@@ -391,7 +391,7 @@
     public boolean storeFile(String name, Exchange exchange) throws GenericFileOperationFailedException {
         // if an existing file already exists what should we do?
         if (endpoint.getFileExist() == GenericFileExist.Ignore || endpoint.getFileExist() == GenericFileExist.Fail) {
-            boolean existFile = existFile(name);
+            boolean existFile = existsFile(name);
             if (existFile && endpoint.getFileExist() == GenericFileExist.Ignore) {
                 // ignore but indicate that the file was written
                 if (LOG.isTraceEnabled()) {
@@ -419,7 +419,7 @@
         }
     }
 
-    private boolean existFile(String name) {
+    public boolean existsFile(String name) throws GenericFileOperationFailedException {
         // check whether a file already exists
         String directory = FileUtil.onlyPath(name);
         if (directory == null) {
@@ -439,6 +439,6 @@
         } catch (SftpException e) {
             throw new GenericFileOperationFailedException(e.getMessage(), e);
         }
-    }
+    }   
 
 }
\ No newline at end of file