Version 3.3.0
What's New
- Resumable uploads and downloads —
SFTPClientProtocol.uploadanddownloadnow acceptresume: true. Existing destination size is used as the transfer offset; if the destination does not exist, the operation starts as a fresh transfer. - Partial file uploads —
SFTPFileProtocol.write(from:)can start at a local file offset and limit the number of bytes transferred withstartFromFileOffsetandupTo. - Append and bounded downloads —
SFTPFileProtocol.read(to:)can append to an existing local file and limit the number of bytes transferred withappendandupTo. - Transferred byte counts — File-level upload and download helpers now return the number of bytes successfully transferred as a discardable result.
try await client.upload(
from: localURL,
to: remotePath,
resume: true
) { _, _, _, _ in true }
try await client.download(
from: remotePath,
to: localURL,
resume: true
) { _, _, _, _ in true }Resume uses the existing destination size and assumes its contents are a valid prefix of the source.
Bug Fixes
- Updated RSA and DSA host-key validation to use provider-backed
EVP_PKEYAPIs, removing deprecated OpenSSL calls and restoring compatibility with modern OpenSSL headers.