(filename: string)
| 46 | } |
| 47 | |
| 48 | export function convertFileNameToDate(filename: string): Date { |
| 49 | const isoStr = filename |
| 50 | .split('.')[0]! |
| 51 | .replace(/T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/, 'T$1:$2:$3.$4Z') |
| 52 | return new Date(isoStr) |
| 53 | } |
| 54 | |
| 55 | async function cleanupOldFilesInDirectory( |
| 56 | dirPath: string, |
no outgoing calls
no test coverage detected