(src: string, dest: string, mode?: number)
| 255 | * Wrapper around fs.copyFile that validates both paths first |
| 256 | */ |
| 257 | export async function copyFile(src: string, dest: string, mode?: number): Promise<void> { |
| 258 | const validatedSrc = validatePath(src); |
| 259 | const validatedDest = validatePath(dest); |
| 260 | return executeWithRetry( |
| 261 | () => fs.copyFile(validatedSrc, validatedDest, mode), |
| 262 | `copyFile(${src}, ${dest})` |
| 263 | ); |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * Wrapper around fs.appendFile that validates path first |
nothing calls this directly
no test coverage detected