private static Ext getExtension(VirtualFile file, int flags) {
    if (file.isDirectory()) {
      if (file.getExtension() == null) {
        return CLOSED_DIR;
      }
      else {
        return new Ext(file.getExtension(), flags);
      }
    }
    else {
      return file.getExtension() != null ? new Ext(file.getExtension()) : NO_EXT;
    }
  }
private static Ext getExtension(VirtualFile file, int flags)