6549850dac
Adds the command `imdl` torrent verify` to verify the contents of torrents. This implementation is extremely naive. It does successfully verify torrents, but it will produce unsatisfying results when a torrent fails verification. In particular, it won't give any information about which pieces in a file were corrupt. type: added
14 lines
312 B
Rust
14 lines
312 B
Rust
use crate::common::*;
|
|
|
|
#[derive(Deserialize, Serialize, Debug, PartialEq, Clone)]
|
|
pub(crate) struct FileInfo {
|
|
pub(crate) length: Bytes,
|
|
pub(crate) path: FilePath,
|
|
#[serde(
|
|
skip_serializing_if = "Option::is_none",
|
|
default,
|
|
with = "unwrap_or_skip"
|
|
)]
|
|
pub(crate) md5sum: Option<Md5Digest>,
|
|
}
|