[Swift-commit] r4600 - provider-wonky/src/org/globus/cog/abstraction/impl/file/wonky

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Fri Jun 10 20:57:49 CDT 2011


Author: hategan
Date: 2011-06-10 20:57:49 -0500 (Fri, 10 Jun 2011)
New Revision: 4600

Modified:
   provider-wonky/src/org/globus/cog/abstraction/impl/file/wonky/FileResourceImpl.java
Log:
updated wonky provider

Modified: provider-wonky/src/org/globus/cog/abstraction/impl/file/wonky/FileResourceImpl.java
===================================================================
--- provider-wonky/src/org/globus/cog/abstraction/impl/file/wonky/FileResourceImpl.java	2011-06-11 01:03:25 UTC (rev 4599)
+++ provider-wonky/src/org/globus/cog/abstraction/impl/file/wonky/FileResourceImpl.java	2011-06-11 01:57:49 UTC (rev 4600)
@@ -28,6 +28,7 @@
 import org.globus.cog.abstraction.impl.file.IllegalHostException;
 import org.globus.cog.abstraction.impl.file.PermissionsImpl;
 import org.globus.cog.abstraction.interfaces.ExecutableObject;
+import org.globus.cog.abstraction.interfaces.FileFragment;
 import org.globus.cog.abstraction.interfaces.FileResource;
 import org.globus.cog.abstraction.interfaces.GridFile;
 import org.globus.cog.abstraction.interfaces.Permissions;
@@ -208,22 +209,17 @@
         }
     }
 
-    public void getFile(String remoteFileName, String localFileName)
-            throws FileResourceException {
-        getFile(remoteFileName, localFileName, null);
-    }
-
     /** copy a file */
-    public void getFile(String remoteFileName, String localFileName,
+    public void getFile(FileFragment remote, FileFragment local,
             ProgressMonitor progressMonitor) throws FileResourceException {
 
         try {
-            File src = resolve(remoteFileName);
+            File src = resolve(remote.getFile());
             if (!src.exists()) {
                 throw new FileNotFoundException("File not found: "
                         + src.getAbsolutePath());
             }
-            File dst = resolve(localFileName);
+            File dst = resolve(local.getFile());
             // silently ignore requests for which source == destination
             if (dst.getCanonicalPath().equals(src.getCanonicalPath())) {
                 return;
@@ -248,17 +244,11 @@
         }
     }
 
-    public void putFile(String localFileName, String remoteFileName,
+    public void putFile(FileFragment local, FileFragment remote,
             ProgressMonitor progressMonitor) throws FileResourceException {
-        getFile(localFileName, remoteFileName, progressMonitor);
+        getFile(local, remote, progressMonitor);
     }
 
-    /** copy a file */
-    public void putFile(String localFileName, String remoteFileName)
-            throws FileResourceException {
-        getFile(localFileName, remoteFileName);
-    }
-
     /** copy a directory */
     public void getDirectory(String remoteDirName, String localDirName)
             throws FileResourceException {
@@ -396,4 +386,13 @@
         return gridFile;
     }
 
+    @Override
+    public boolean supportsPartialTransfers() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsThirdPartyTransfers() {
+        return false;
+    }
 }




More information about the Swift-commit mailing list