code: func IsDir(dir string) (bool, error) {
  	_, err := os.Stat(filepath.Join(dir, defaultIndexFile))
  	if os.IsNotExist(err) {
  		return false, nil
  	}
  	return err == nil, err
  }
docs: // IsDir reports whether dir is a diskpacked directory.