(
id: i32,
remote: String,
path: String,
file_num: i32,
show_hidden: bool,
is_remote: bool,
enable_overwrite_detection: bool,
)
| 299 | } |
| 300 | |
| 301 | pub fn new_read( |
| 302 | id: i32, |
| 303 | remote: String, |
| 304 | path: String, |
| 305 | file_num: i32, |
| 306 | show_hidden: bool, |
| 307 | is_remote: bool, |
| 308 | enable_overwrite_detection: bool, |
| 309 | ) -> ResultType<Self> { |
| 310 | log::info!("new read {}", path); |
| 311 | let files = get_recursive_files(&path, show_hidden)?; |
| 312 | let total_size = files.iter().map(|x| x.size).sum(); |
| 313 | Ok(Self { |
| 314 | id, |
| 315 | remote, |
| 316 | path: get_path(&path), |
| 317 | file_num, |
| 318 | show_hidden, |
| 319 | is_remote, |
| 320 | files, |
| 321 | total_size, |
| 322 | enable_overwrite_detection, |
| 323 | ..Default::default() |
| 324 | }) |
| 325 | } |
| 326 | |
| 327 | #[inline] |
| 328 | pub fn files(&self) -> &Vec<FileEntry> { |
nothing calls this directly
no test coverage detected