MCPcopy Create free account
hub / github.com/bufbuild/buf / GetFilePaths

Function GetFilePaths

private/bufpkg/bufmodule/module_read_bucket.go:187–193  ·  view source on GitHub ↗

GetFilePaths is a convenience function that gets all the target and non-target file paths for the ModuleReadBucket. Sorted.

(ctx context.Context, moduleReadBucket ModuleReadBucket)

Source from the content-addressed store, hash-verified

185//
186// Sorted.
187func GetFilePaths(ctx context.Context, moduleReadBucket ModuleReadBucket) ([]string, error) {
188 fileInfos, err := GetFileInfos(ctx, moduleReadBucket)
189 if err != nil {
190 return nil, err
191 }
192 return xslices.Map(fileInfos, func(fileInfo FileInfo) string { return fileInfo.Path() }), nil
193}
194
195// GetTargetFilePaths is a convenience function that gets all the target
196// file paths for the ModuleReadBucket.

Callers

nothing calls this directly

Calls 2

GetFileInfosFunction · 0.85
PathMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…