(fileName: string, targetPath: string, mode?: number)
| 98 | * still exists. New writes should always target `targetPath`. |
| 99 | */ |
| 100 | export function resolveReadPathSync(fileName: string, targetPath: string, mode?: number): string { |
| 101 | migrateLegacyFileSync(fileName, targetPath, mode); |
| 102 | if (fs.existsSync(targetPath)) { |
| 103 | return targetPath; |
| 104 | } |
| 105 | const legacyPath = getLegacyFilePath(fileName); |
| 106 | return fs.existsSync(legacyPath) ? legacyPath : targetPath; |
| 107 | } |
| 108 | |
| 109 | export async function resolveReadPath( |
| 110 | fileName: string, |
no test coverage detected