(src, dest, mode)
| 1329 | } |
| 1330 | |
| 1331 | async function copyFile(src, dest, mode) { |
| 1332 | const h = vfsState.handlers; |
| 1333 | if (h !== null) { |
| 1334 | const promise = h.copyFile(src, dest, mode); |
| 1335 | if (promise !== undefined) { await promise; return; } |
| 1336 | } |
| 1337 | return await PromisePrototypeThen( |
| 1338 | binding.copyFile( |
| 1339 | getValidatedPath(src, 'src'), |
| 1340 | getValidatedPath(dest, 'dest'), |
| 1341 | mode, |
| 1342 | kUsePromises, |
| 1343 | ), |
| 1344 | undefined, |
| 1345 | handleErrorFromBinding, |
| 1346 | ); |
| 1347 | } |
| 1348 | |
| 1349 | // Note that unlike fs.open() which uses numeric file descriptors, |
| 1350 | // fsPromises.open() uses the fs.FileHandle class. |
nothing calls this directly
no test coverage detected
searching dependent graphs…