compute "attrs" field
This commit is contained in:
parent
ab173c00f6
commit
2e7c7216e3
3 changed files with 5 additions and 1 deletions
|
|
@ -1,10 +1,13 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use librqbit_core::torrent_metainfo::FileDetailsAttrs;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct FileInfo {
|
||||
pub relative_filename: PathBuf,
|
||||
pub offset_in_torrent: u64,
|
||||
pub piece_range: std::ops::Range<u32>,
|
||||
pub attrs: FileDetailsAttrs,
|
||||
pub len: u64,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1149,6 +1149,7 @@ impl Session {
|
|||
offset_in_torrent: fd.offset,
|
||||
piece_range: fd.pieces,
|
||||
len: fd.details.len,
|
||||
attrs: fd.details.attrs(),
|
||||
})
|
||||
})
|
||||
.collect::<anyhow::Result<Vec<FileInfo>>>()?;
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Default, Debug, Clone, Copy)]
|
||||
pub struct FileDetailsAttrs {
|
||||
pub symlink: bool,
|
||||
pub hidden: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue