MCPcopy Index your code
hub / github.com/Recordscript/recordscript / modify_time

Method modify_time

libs/hbb_common/src/fs.rs:362–375  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

360 }
361
362 pub fn modify_time(&self) {
363 let file_num = self.file_num as usize;
364 if file_num < self.files.len() {
365 let entry = &self.files[file_num];
366 let path = self.join(&entry.name);
367 let download_path = format!("{}.download", get_string(&path));
368 std::fs::rename(download_path, &path).ok();
369 filetime::set_file_mtime(
370 &path,
371 filetime::FileTime::from_unix_time(entry.modified_time as _, 0),
372 )
373 .ok();
374 }
375 }
376
377 pub fn remove_download_file(&self) {
378 let file_num = self.file_num as usize;

Callers 1

writeMethod · 0.45

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected