code: func CalcCopyInfo(origPath, rootPath string, allowWildcards bool) ([]CopyInfo, error) {
  	explicitDir := origPath == "." || origPath == "/" || strings.HasSuffix(origPath, "/.") || strings.HasSuffix(origPath, "/")
  	// all CopyInfo resulting from this call will have FromDir set to explicitDir
  	infos, err := calcCopyInfo(origPath, rootPath, allowWildcards, explicitDir)
  	if err != nil {
  		return nil, err
  	}
  	return infos, nil
  }
docs: // CalcCopyInfo identifies the source files selected by a Dockerfile ADD or COPY instruction.