(dirPath: string, fsImpl: FsOperations)
| 145 | } |
| 146 | |
| 147 | async function tryRmdir(dirPath: string, fsImpl: FsOperations): Promise<void> { |
| 148 | try { |
| 149 | await fsImpl.rmdir(dirPath) |
| 150 | } catch { |
| 151 | // not empty / doesn't exist |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | export async function cleanupOldSessionFiles(): Promise<CleanupResult> { |
| 156 | const cutoffDate = getCutoffDate() |
no outgoing calls
no test coverage detected