(path: string)
| 46 | * Opens `path` for reading. Returns null on ENOENT. Caller owns close(). |
| 47 | */ |
| 48 | export async function openForScan(path: string): Promise<FileHandle | null> { |
| 49 | try { |
| 50 | return await open(path, 'r') |
| 51 | } catch (e) { |
| 52 | if (isENOENT(e)) return null |
| 53 | throw e |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Handle-accepting core of readEditContext. Caller owns open/close. |
no test coverage detected