( dir: string, filter: (name: string) => boolean, )
| 102 | } |
| 103 | |
| 104 | async function listDirSafe( |
| 105 | dir: string, |
| 106 | filter: (name: string) => boolean, |
| 107 | ): Promise<string[]> { |
| 108 | try { |
| 109 | const names = await readdir(dir); |
| 110 | return names.filter(filter); |
| 111 | } catch { |
| 112 | return []; |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | async function readWireMtime(sessionDir: string): Promise<number> { |
| 117 | try { |
no test coverage detected