I am using node and I need to copy a file that may be pretty big.
Is it fine to use copyFileSync?
I can't find any source about it describing its implementation. I need to know if it works with streams or just loads everything into memory and writes the file.
Small examples
import { copyFileSync } from 'fs';
copyFileSync(srcPath, destPath);
import { copyFile } from 'fs/promises';
await copyFile(srcPath, destPath);