code: func StatDir(path string) (os.FileInfo, error) {
  	fi, err := os.Stat(path)
  	if err != nil {
  		return nil, trace.ConvertSystemError(err)
  	}
  	if !fi.IsDir() {
  		return nil, trace.BadParameter("%v is not a directory", path)
  	}
  	return fi, nil
  }
docs: // StatDir stats directory, returns error if file exists, but not a directory