code: func (actor Actor) GatherArchiveResources(archivePath string) ([]Resource, error) {
  	var resources []Resource
  
  	archive, err := os.Open(archivePath)
  	if err != nil {
  		return nil, err
  	}
  	defer archive.Close()
  
  	reader, err := actor.newArchiveReader(archive)
  	if err != nil {
  		return nil, err
  	}
  
  	gitIgnore, err := actor.generateArchiveCFIgnoreMatcher(reader.File)
  	if err != nil {
  		log.Errorln("reading .cfignore file:", err)
  		return nil, err
  	}
  
  	for _, archivedFile := range reader.File {
  		filename := filepath.ToSlash(archivedFile.Name)
  		if gitIgnore.MatchesPath(filename) {
  			continue
  		}
  
  		resource := Resource{Filename: filename}
  		info := archivedFile.FileInfo()
  
  		switch {
  		case info.IsDir():
  			resource.Mode = DefaultFolderPermissions
  		case info.Mode()&os.ModeSymlink == os.ModeSymlink:
  			resource.Mode = info.Mode()
  		default:
  			fileReader, err := archivedFile.Open()
  			if err != nil {
  				return nil, err
  			}
  			defer fileReader.Close()
  
  			hash := sha1.New()
  
  			_, err = io.Copy(hash, fileReader)
  			if err != nil {
  				return nil, err
  			}
  
  			resource.Mode = DefaultArchiveFilePermissions
  			resource.SHA1 = fmt.Sprintf("%x", hash.Sum(nil))
  			resource.Size = archivedFile.FileInfo().Size()
  		}
  
  		resources = append(resources, resource)
  	}
  	if len(resources) <= 1 {
  		return nil, actionerror.EmptyArchiveError{Path: archivePath}
  	}
  	return resources, nil
  }
docs: // GatherArchiveResources returns a list of resources for an archive.