code: func pathDeviceType(path string) (deviceType, error) {
  	fi, err := os.Stat(path)
  	if err != nil {
  		return modeUnsupported, err
  	}
  	switch mode := fi.Mode(); {
  	case mode&os.ModeDevice != 0:
  		return modeBlock, nil
  	case mode.IsRegular():
  		return modeFile, nil
  	default:
  		return modeUnsupported, nil
  	}
  }
docs: // pathMode returns the FileMode for a path.