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