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)
| 55 | // func f. It will skip over directories. |
| 56 | // Returns empty string slice if nothing found, otherwise returns all matched file names. |
| 57 | func 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 |
no test coverage detected