(kind)
| 261 | // a zero-padded step index (`0000_`, `0001_`...), so a lexical sort is |
| 262 | // chronological. |
| 263 | list(kind) { |
| 264 | const suffix = KIND_SUFFIX[kind] |
| 265 | if (!suffix || !this.dir || !fs.existsSync(this.dir)) return [] |
| 266 | let entries |
| 267 | try { entries = fs.readdirSync(this.dir) } catch { return [] } |
| 268 | return entries.filter(f => f.endsWith(suffix)).sort() |
| 269 | } |
| 270 | |
| 271 | // Path of the n-th file of `kind`, or null. Python-style indexing: |
| 272 | // 0..N-1 from the start, -1..-N from the end. |