(dir, predicate = () => true)
| 79 | } |
| 80 | } |
| 81 | |
| 82 | function listFiles(dir, predicate = () => true) { |
| 83 | try { |
| 84 | if (!fs.existsSync(dir)) return []; |
| 85 | return fs.readdirSync(dir) |
| 86 | .filter((entry) => predicate(entry)) |
| 87 | .map((entry) => path.join(dir, entry)); |
| 88 | } catch { |
| 89 | return []; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | function tailJsonl(filePath, limit) { |
no outgoing calls
no test coverage detected