Expand description
Random-access destination file (PRD §9).
Workers write straight into the final file at the right offset. There are no per-chunk temp files and no merge pass, so a 500 GB download needs 500 GB of disk, not 1 TB, and finishing costs nothing.
Positioned writes (pwrite) are used rather than seek+write so that
concurrent writers share one file descriptor without a lock and without
racing on the file cursor.
Structs§
- Dest
File - File
Identity - Identifies the file, not the path. Used on resume to detect that the file we recorded progress against has been replaced by a different one.