DownloadState#
Manages the persistent state of downloads, including completed, failed, and delay statistics.
This class provides atomic file operations for safe concurrent access, tracks download progress, and maintains statistics for reporting and incremental downloads.
- param state_file:
Path to the state file (JSON).
- type state_file:
str
- param incremental:
If True, loads existing state; otherwise, starts fresh.
- type incremental:
bool