kbFiles returns the absolute paths of all existing KB files under the given flow root, in the canonical order (user, org, products, processes, business). Paths for files that don't exist on disk are omitted — users can delete any kb file they don't care about without breaking show.
(root string)
| 183 | // business). Paths for files that don't exist on disk are omitted — users |
| 184 | // can delete any kb file they don't care about without breaking show. |
| 185 | func kbFiles(root string) []string { |
| 186 | var out []string |
| 187 | for _, kb := range kbSeeds() { |
| 188 | p := filepath.Join(root, "kb", kb.filename) |
| 189 | if _, err := os.Stat(p); err == nil { |
| 190 | out = append(out, p) |
| 191 | } |
| 192 | } |
| 193 | return out |
| 194 | } |
no test coverage detected