MCPcopy Create free account
hub / github.com/Recordscript/recordscript / new_write

Method new_write

libs/hbb_common/src/fs.rs:275–299  ·  view source on GitHub ↗
(
        id: i32,
        remote: String,
        path: String,
        file_num: i32,
        show_hidden: bool,
        is_remote: bool,
        files: Vec<FileEntry>,
        enable_overwrite_dete

Source from the content-addressed store, hash-verified

273impl TransferJob {
274 #[allow(clippy::too_many_arguments)]
275 pub fn new_write(
276 id: i32,
277 remote: String,
278 path: String,
279 file_num: i32,
280 show_hidden: bool,
281 is_remote: bool,
282 files: Vec<FileEntry>,
283 enable_overwrite_detection: bool,
284 ) -> Self {
285 log::info!("new write {}", path);
286 let total_size = files.iter().map(|x| x.size).sum();
287 Self {
288 id,
289 remote,
290 path: get_path(&path),
291 file_num,
292 show_hidden,
293 is_remote,
294 files,
295 total_size,
296 enable_overwrite_detection,
297 ..Default::default()
298 }
299 }
300
301 pub fn new_read(
302 id: i32,

Callers

nothing calls this directly

Calls 2

get_pathFunction · 0.85
iterMethod · 0.80

Tested by

no test coverage detected