    001    /*
    002     * Created on Aug 21, 2005
    003     *
    004     * @design kiniry 21 Aug 2005 - Refactored out of InputEntry to avoid
    005     * existing recursion bug in typechecker in handling nested classes.
    006     */
    007
    008    package javafe;
    009
    010    import java.io.File;
    011
    012    public class DirInputEntry extends InputEntry {
    013      public DirInputEntry(String n) { super(n); }
    014      public String type() { return "Directory"; }
    015      public String typeOption() { return "dir"; }
    016      public String verify() {
    017        return verify(name);
    018      }
    019      static public String verify(String name) {
    020        java.io.File f= new java.io.File(name);
    021        if (f.exists() && f.isDirectory()) return null;
    022        return "Directory does not exist";
    023      }
    024    }