Code example for File

Methods: existsgetAbsolutePathisDirectory

0
    } 
  } 
 
  private static void ensureDir(File dir) throws IOException
  { 
    if (dir.exists() && !dir.isDirectory())
    { 
      throw new IOException("Not a directory: " + dir.getAbsolutePath());
    } 
  } 
 
}