// Import config file to a target destination
Import config file to a target destination
Import config file to a target destination
fn import(path: &str) -> std::io::Result<()> {
  let base_path = preferences::prefs_base_dir().unwrap();
  if !Path::new(&base_path.join("fidelius")).exists() {
    fs::create_dir(&base_path.join("fidelius"))?;
  }
  let file_path = PathBuf::from("fidelius/keys.prefs.json");
  let keys_path = base_path.join(file_path.clone());
  fs::copy(path, keys_path)?;
  Ok(())
}
fn import ( path : & str ) -> std :: io :: Result < ( ) > { let base_path = preferences :: prefs_base_dir ( ) . unwrap ( ) ; if ! Path :: new ( & base_path . join ( " " ) ) . exists ( ) { fs :: create_dir ( & base_path . join ( " " ) ) ? ; } let file_path = PathBuf :: from ( " " ) ; let keys_path = base_path . join ( file_path . clone ( ) ) ; fs :: copy ( path , keys_path ) ? ; Ok ( ( ) ) }
Import config file to a target destination
Import config file to a target destination
path
&str