// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;

public class DF {
   public static void test(String path) {
      System.out.println(path);
      File f = new File(path);
      System.out.println(!f.isDirectory());
      System.out.println(f.isFile());
      System.out.println(!f.getName().equals(""));
      System.out.println(f.getName().indexOf(".") > 0);
   }
   public static void main(String[] args) {
      test("\\dir\\subdir\\fil.typ");
      test("\\dir\\subdir\\fil");
      test("\\dir\\subdir\\");
      test("\\dir\\subdir");
      test("\\dir\\sub.dir");
   }
}
