(filepath: string)
| 50 | export const MAX_OUTPUT_SIZE = 0.25 * 1024 * 1024 // 0.25MB in bytes |
| 51 | |
| 52 | export function readFileSafe(filepath: string): string | null { |
| 53 | try { |
| 54 | const fs = getFsImplementation() |
| 55 | return fs.readFileSync(filepath, { encoding: 'utf8' }) |
| 56 | } catch (error) { |
| 57 | logError(error) |
| 58 | return null |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Get the normalized modification time of a file in milliseconds. |
no test coverage detected