saveResumeData

suspend fun saveResumeData(savePath: String = ""): AddTorrentParams

Capture the current piece state as fast-resume AddTorrentParams. This is the port of save_resume_data / write_resume_data. The result round-trips through ResumeData.write/read (embedding the raw info dict so the torrent reloads without its .torrent file) and feeds straight back into applyResumeData on the next run. Verified have pieces become both havePieces and verifiedPieces (every v1 piece is hash-checked before it's marked had); partially-downloaded pieces export their on-disk (FINISHED) blocks as an unfinished block bitmask.

Parameters

savePath

the storage path to record (the disk layer owns it; the session doesn't, so the caller supplies it).