fs_extra
fs_extra copied to clipboard
Errors in `fs_extra` are different than in `std::fs`
if let Err(e) = fs_extra::dir::move_dir(&thing, &destination_file, &fs_extra::dir::CopyOptions::new()) {
messages += format!("Failed to move folder {}, reason {}\n", thing, e).as_str();
continue 'next_result;
}
such code prints(error contains file name)
Failed to move file /home/rafal/TESTTT/TT/AutoSave_0091.sav, reason Path "/home/rafal/TESTTT/TT/AutoSave_0091.sav" is exist
but such code from std::fs
don't print name of file/folder which is I think better, because I can put this name in any other place
if let Err(e) = fs::metadata("/hehe") {
messages += format!("HEHE {}, reason {}\n", thing, e).as_str();
continue 'next_result;
}
HEHE /hehe reason No such file or directory (os error 2)