SLIDER-38 add utility CoreFileSystem::fileToPath() method. Nothing complex, 
just keeps it in one place



Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0e7e1694
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0e7e1694
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0e7e1694

Branch: refs/heads/develop
Commit: 0e7e16942c90bfc3a70c0922f751c9fe25868086
Parents: 04a7ba0
Author: Steve Loughran <ste...@apache.org>
Authored: Sun May 25 14:29:44 2014 +0100
Committer: Steve Loughran <ste...@apache.org>
Committed: Sun May 25 14:29:44 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/slider/common/tools/CoreFileSystem.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0e7e1694/slider-core/src/main/java/org/apache/slider/common/tools/CoreFileSystem.java
----------------------------------------------------------------------
diff --git 
a/slider-core/src/main/java/org/apache/slider/common/tools/CoreFileSystem.java 
b/slider-core/src/main/java/org/apache/slider/common/tools/CoreFileSystem.java
index a083691..714322c 100644
--- 
a/slider-core/src/main/java/org/apache/slider/common/tools/CoreFileSystem.java
+++ 
b/slider-core/src/main/java/org/apache/slider/common/tools/CoreFileSystem.java
@@ -542,4 +542,10 @@ public class CoreFileSystem {
                                                                 
clusterSpecPath);
     }
   }
+  
+  public Path fileToPath(File file) {
+    return new Path(file.getAbsoluteFile().toURI());
+
+  }
+  
 }

Reply via email to