( filePath: string, data: string | Buffer, optionsOrEncoding?: BufferEncoding | WriteFileOptions )
| 178 | * Wrapper around fs.writeFile that validates path first |
| 179 | */ |
| 180 | export async function writeFile( |
| 181 | filePath: string, |
| 182 | data: string | Buffer, |
| 183 | optionsOrEncoding?: BufferEncoding | WriteFileOptions |
| 184 | ): Promise<void> { |
| 185 | const validatedPath = validatePath(filePath); |
| 186 | return executeWithRetry( |
| 187 | () => fs.writeFile(validatedPath, data, optionsOrEncoding), |
| 188 | `writeFile(${filePath})` |
| 189 | ); |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Wrapper around fs.mkdir that validates path first |
nothing calls this directly
no test coverage detected