MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / EnumerateFiles

Function EnumerateFiles

lib/utils.go:13–28  ·  view source on GitHub ↗
(dirToEnumerate string)

Source from the content-addressed store, hash-verified

11}
12
13func EnumerateFiles(dirToEnumerate string) []string {
14 var fileList []string
15 entries, err := os.ReadDir(dirToEnumerate)
16 if err != nil {
17 return fileList
18 }
19
20 for _, entry := range entries {
21 if entry.Name()[0] == '.' {
22 continue
23 }
24 fileList = append(fileList, filepath.Join(dirToEnumerate, entry.Name()))
25 }
26
27 return fileList
28}

Callers 2

processDirectoryFunction · 0.92
ReadCrontabsInDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected