code: func PathWithinBase(fullPath, basePath string) bool {
  	rel, err := filepath.Rel(basePath, fullPath)
  	if err != nil {
  		return false
  	}
  	if StartsWithBackstep(rel) {
  		// Needed to escape the base path
  		return false
  	}
  	return true
  }
docs: // PathWithinBase checks if give path is within given base directory.