Get all shard file paths matching this WAL's base name
()
| 323 | |
| 324 | /** Get all shard file paths matching this WAL's base name */ |
| 325 | private shardFiles() { |
| 326 | if (!fs.existsSync(this.#dir)) { |
| 327 | return []; |
| 328 | } |
| 329 | |
| 330 | const groupDir = path.join(this.#dir, this.groupId); |
| 331 | if (!fs.existsSync(groupDir)) { |
| 332 | return []; |
| 333 | } |
| 334 | |
| 335 | return fs |
| 336 | .readdirSync(groupDir) |
| 337 | .filter(entry => entry.endsWith(this.#format.walExtension)) |
| 338 | .filter(entry => entry.startsWith(`${this.#format.baseName}`)) |
| 339 | .map(entry => path.join(groupDir, entry)); |
| 340 | } |
| 341 | |
| 342 | /** Get shard file paths created by this instance */ |
| 343 | private getCreatedShardFiles() { |
no outgoing calls
no test coverage detected