You need to be more specific. What is a generator? Are you wanting to transfer to a USB attached disk drive?
If the USB device is mounted as a file system, you can simply copy it using plain node.js. You need to use fs-extra module to transfer file across devices. Check the documentation to find samples on how to copy files.