Maximum files transferred in parallel for directory copies. SFTP only, SCP streams one file at a time over a single channel. Defaults to 4.
filter?
(path, entry) => boolean
Decides whether an entry is copied. path is relative to the transfer root and uses /. Returning false for a directory skips the whole subtree. Symlinks are followed and other entries such as sockets are skipped, so the filter only sees files and directories.
onProgress?
(progress) => void
Called whenever bytes move.
preserve?
boolean
Keep modification and access times and the full mode, including setuid, setgid and sticky bits, also on files that already exist, like scp -p. Without it new files still get the source's permission bits, reduced by the umask, and existing files keep their mode.
recursive?
boolean
Required to copy directories, like scp -r.
signal?
AbortSignal
Cancels the transfer. Files already in flight over SFTP finish in the background.