class Directory implements Serializable {

  public boolean isParentOf(final File file) {
    final File thisFile = getFile();

    File candidate = file.getParentFile();

    while (candidate != null) {
      if (thisFile.equals(candidate)) {
        return true;
      }

      candidate = candidate.getParentFile();
    }


    return false;
  }

  public  Directory();
  public  Directory(final File directory);

}