code: func errorStatus(err error) uint32 {
  	if x, ok := err.(*Status); ok {
  		return x.Code
  	}
  
  	switch {
  	case os.IsNotExist(err):
  		return StatusNoSuchFileOrDir
  	case os.IsExist(err):
  		return StatusFileExists
  	case os.IsPermission(err):
  		return StatusOperationNotPermitted
  	}
  
  	return StatusGenericError
  }
docs: // errorStatus maps the given error type to a status code