pub fn mk_emptyfolder(folder_name: &str) -> Result<(String, String)> {
        let name = get_random_nrs_string();
        let path_random = env::temp_dir().join(name);
        let path_emptyfolder = path_random.join(folder_name);
        fs::create_dir_all(&path_emptyfolder).wrap_err(format!(
            "Failed to create path: {}",
            path_emptyfolder.display()
        ))?;
        let empty_folder_path_trailing_slash =
            format!("{}/", path_emptyfolder.display().to_string());
        Ok((
            path_random.display().to_string(),
            empty_folder_path_trailing_slash,
        ))
    }
// We create a folder named "emptyfolder" inside a randomly
// named folder in system temp dir, and return both paths.
We create a folder named "emptyfolder" inside a randomly
named folder in system temp dir, and return both paths.
We create a folder named " emptyfolder " inside a randomly named folder in system temp dir and return both paths .
pub fn mk_emptyfolder(folder_name: &str) -> Result<(String, String)> {
        let name = get_random_nrs_string();
        let path_random = env::temp_dir().join(name);
        let path_emptyfolder = path_random.join(folder_name);
        fs::create_dir_all(&path_emptyfolder).wrap_err(format!(
            "Failed to create path: {}",
            path_emptyfolder.display()
        ))?;
        let empty_folder_path_trailing_slash =
            format!("{}/", path_emptyfolder.display().to_string());
        Ok((
            path_random.display().to_string(),
            empty_folder_path_trailing_slash,
        ))
    }
pub fn mk_emptyfolder ( folder_name : & str ) -> Result < ( String , String ) > { let name = get_random_nrs_string ( ) ; let path_random = env :: temp_dir ( ) . join ( name ) ; let path_emptyfolder = path_random . join ( folder_name ) ; fs :: create_dir_all ( & path_emptyfolder ) . wrap_err ( format ! ( " " path_emptyfolder display ( ) ) ) ? ; let empty_folder_path_trailing_slash = format ! ( " " path_emptyfolder display ( ) to_string ( ) ) ; Ok ( ( path_random . display ( ) . to_string ( ) , empty_folder_path_trailing_slash , ) ) }
We create a folder named "emptyfolder" inside a randomly
named folder in system temp dir, and return both paths.
We create a folder named " emptyfolder " inside a randomly named folder in system temp dir and return both paths .
folder_name
&str
folder_name
&str