(...paths: string[])
| 41 | } |
| 42 | |
| 43 | export const readFile = (...paths: string[]): Promise<string | void> => { |
| 44 | const filePath = getWorkspacePath(...paths) |
| 45 | logger(`Reading file: ${filePath}`) |
| 46 | return asyncReadFile(getWorkspacePath(...paths), 'utf8').catch((err) => { |
| 47 | logger(`Failed to read from ${filePath}: ${err.message}`) |
| 48 | }) |
| 49 | } |
| 50 | |
| 51 | export const writeFile = (data: any, ...paths: string[]): Promise<void> => { |
| 52 | const filePath = getWorkspacePath(...paths) |
no test coverage detected