code: func GetVolumeMode(volUtil util.VolumeUtil, fullPath string) (v1.PersistentVolumeMode, error) {
  	isdir, errdir := volUtil.IsDir(fullPath)
  	if isdir {
  		return v1.PersistentVolumeFilesystem, nil
  	}
  	// check for Block before returning errdir
  	isblk, errblk := volUtil.IsBlock(fullPath)
  	if isblk {
  		return v1.PersistentVolumeBlock, nil
  	}
  
  	if errdir == nil && errblk == nil {
  		return "", fmt.Errorf("Skipping file %q: not a directory nor block device", fullPath)
  	}
  
  	// report the first error found
  	if errdir != nil {
  		return "", fmt.Errorf("Directory check for %q failed: %s", fullPath, errdir)
  	}
  	return "", fmt.Errorf("Block device check for %q failed: %s", fullPath, errblk)
  }
docs: // GetVolumeMode check volume mode of given path.