Transfer Resume
The plugin supports resuming interrupted transfers in SFTP mode and partially in Shell Fallback mode. Resume behavior differs depending on the active transfer method.
SFTP (primary mode) — full resume support
SFTP resume works for both downloads and uploads.
Download resume
- Total Commander detects that a partial local file already exists at the destination.
- TC passes a resume flag to the plugin.
- The plugin queries the remote file size via SFTP
fstat (with the ATTR_SIZE flag set — required for correct size retrieval).
- The remote file handle is seeked to the end of the already-downloaded portion.
- Transfer continues from that offset.
Upload resume
- TC detects a partial remote file.
- The plugin opens the remote file for append and seeks to its current end.
- Upload continues from the local file offset matching the remote file size.
Note: Resume requires that the remote file has not been modified or truncated since the interrupted transfer. If the remote file size does not match the expected partial size, TC will prompt you to overwrite or skip.
SCP (native) — no mid-transfer resume
The SCP protocol does not support seeking into a remote file. If an SCP transfer is interrupted:
- The transfer must restart from the beginning.
- TC will prompt you to overwrite the partial destination file.
- If you need resume support for large files on a server that only supports SCP, consider switching to Shell Fallback (base64) or requesting SFTP subsystem access from the server administrator.
Shell Fallback (base64) — chunked resume
Shell fallback transfers data in base64-encoded 1024-byte chunks. Resume is possible at chunk boundaries.
- Base64 encoding works in groups of 3 bytes → 4 characters. Chunks are kept at multiples of 3 bytes (≤ 1024 bytes) so that resume always lands on a valid base64 boundary.
- On resume, the plugin calculates the nearest safe boundary below the partial file size and restarts from there.
- A small overlap (up to 3 bytes) may be re-transferred, which is harmless.
Performance note: Shell fallback is significantly slower than SFTP or SCP due to base64 encoding overhead and shell command round-trips. Use it only when SFTP and SCP are both unavailable on the server.
PHP Agent — no resume
PHP Agent single-file transfers (GET/PUT operations) do not support partial resume. If interrupted, the transfer must restart from the beginning — this is a limitation of the HTTP chunked transfer model used by the agent.
PHP Agent TAR stream transfers (directory download via TAR_STREAM, batch upload via TAR_EXTRACT) also do not support resume. The entire TAR stream must complete in one HTTP request. If a TAR transfer is interrupted, re-copy the whole directory.
LAN Pair — full resume support
LAN Pair file transfers support resume at the session protocol level. If the session times out or the connection drops mid-transfer, you can reconnect and resume using TC's standard resume prompt.
Summary
| Mode | Download resume | Upload resume | Notes |
| SFTP | Yes | Yes | Full seek support via libssh2 |
| SCP (native) | No | No | Protocol limitation |
| Shell Fallback | Partial | Partial | Chunk-boundary resume only |
| PHP Agent | No | No | HTTP transfer model limitation |
| LAN Pair | Yes | Yes | Session-level resume |
Back to index