(dirPath: string)
| 97 | } |
| 98 | |
| 99 | function newestMtimeMs(dirPath: string): number { |
| 100 | let newest = statMtimeMs(dirPath); |
| 101 | let children: fs.Dirent[]; |
| 102 | try { |
| 103 | children = fs.readdirSync(dirPath, { withFileTypes: true }); |
| 104 | } catch { |
| 105 | return newest; |
| 106 | } |
| 107 | for (const child of children) { |
| 108 | newest = Math.max(newest, statMtimeMs(path.join(dirPath, child.name))); |
| 109 | } |
| 110 | return newest; |
| 111 | } |
| 112 | |
| 113 | function statMtimeMs(filePath: string): number { |
| 114 | try { |
no test coverage detected