PathData implements Comparable<PathData> { @Override public String toString() { return uriToString(uri, inferredSchemeFromPath); } PathData(String pathString, Configuration conf);  PathData(URI localPath, Configuration conf); private  PathData(FileSystem fs, String pathString); private  PathData(FileSystem fs, String pathString, FileStatus stat); FileStatus refreshStatus(); PathData suffix(String extension); boolean parentExists(); boolean representsDirectory(); PathData[] getDirectoryContents(); RemoteIterator<PathData> getDirectoryContentsIterator(); PathData getPathDataForChild(PathData child); static PathData[] expandAsGlob(String pattern, Configuration conf); @Override String toString(); File toFile(); @Override int compareTo(PathData o); @Override boolean equals(Object o); @Override int hashCode(); public FileSystem fs; final Path path; public FileStatus stat; public boolean exists; }
@Test (timeout = 30000) public void testWithStringAndConfForBuggyPath() throws Exception { String dirString = "file: Path tmpDir = new Path(dirString); PathData item = new PathData(dirString, conf); assertEquals("file:/tmp", tmpDir.toString()); checkPathData(dirString, item); }