MCPcopy
hub / github.com/eth0izzle/shhgit / GetMatchingFiles

Function GetMatchingFiles

core/match.go:63–77  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

61}
62
63func GetMatchingFiles(dir string) []MatchFile {
64 fileList := make([]MatchFile, 0)
65 maxFileSize := *session.Options.MaximumFileSize * 1024
66
67 filepath.Walk(dir, func(path string, f os.FileInfo, err error) error {
68 if err != nil || f.IsDir() || uint(f.Size()) > maxFileSize || IsSkippableFile(path) {
69 return nil
70 }
71
72 fileList = append(fileList, NewMatchFile(path))
73 return nil
74 })
75
76 return fileList
77}

Callers 1

processRepositoryOrGistFunction · 0.92

Calls 2

IsSkippableFileFunction · 0.85
NewMatchFileFunction · 0.85

Tested by

no test coverage detected