MCPcopy Create free account
hub / github.com/code-pushup/cli / shardFiles

Method shardFiles

packages/utils/src/lib/wal-sharded.ts:325–340  ·  view source on GitHub ↗

Get all shard file paths matching this WAL's base name

()

Source from the content-addressed store, hash-verified

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() {

Callers 4

finalizeMethod · 0.95
cleanupMethod · 0.95
statsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected