(err: unknown)
| 3 | */ |
| 4 | |
| 5 | export function isLikelyFileNotFoundError(err: unknown): boolean { |
| 6 | const s = String(err).toLowerCase(); |
| 7 | return ( |
| 8 | s.includes('no such file') || |
| 9 | s.includes('does not exist') || |
| 10 | s.includes('not found') || |
| 11 | s.includes('os error 2') || |
| 12 | s.includes('enoent') || |
| 13 | s.includes('path not found') |
| 14 | ); |
| 15 | } |
| 16 | |
| 17 | /** Metadata from get_file_metadata uses camelCase fields from desktop commands. */ |
| 18 | export function isFileMissingFromMetadata(fileInfo: unknown): boolean { |
no test coverage detected