class PathData implements Comparable<PathData> {

  public PathData[] getDirectoryContents() throws IOException {
    checkIfExists(FileTypeRequirement.SHOULD_BE_DIRECTORY);
    FileStatus[] stats = fs.listStatus(path);
    PathData[] items = new PathData[stats.length];
    for (int i=0; i < stats.length; i++) {
      // preserve relative paths
      String child = getStringForChildPath(stats[i].getPath());
      items[i] = new PathData(fs, child, stats[i]);
    }
    Arrays.sort(items);
    return items;
  }

  public  PathData(String pathString, Configuration conf);
  public  PathData(URI localPath, Configuration conf);
  private  PathData(FileSystem fs, String pathString);
  private  PathData(FileSystem fs, String pathString, FileStatus stat);

}