MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / FindFilesFunc

Function FindFilesFunc

x/file.go:57–61  ·  view source on GitHub ↗

FindFilesFunc walks the directory 'dir' and collects all file names matched by func f. It will skip over directories. Returns empty string slice if nothing found, otherwise returns all matched file names.

(dir string, f func(string) bool)

Source from the content-addressed store, hash-verified

55// func f. It will skip over directories.
56// Returns empty string slice if nothing found, otherwise returns all matched file names.
57func FindFilesFunc(dir string, f func(string) bool) []string {
58 return WalkPathFunc(dir, func(path string, isdir bool) bool {
59 return !isdir && f(path)
60 })
61}
62
63// FindDataFiles returns a list of data files as a string array. If str is a comma-separated list
64// of paths, it returns that list. If str is a single path that is not a directory, it returns that

Callers 1

FindDataFilesFunction · 0.85

Calls 1

WalkPathFuncFunction · 0.85

Tested by

no test coverage detected