fn mkdir_bin_parent(output_path: &Path) -> Result<(), Error> {
    if output_path.is_file() {
        return Ok(());
    }
    let parent = output_path
        .parent()
        .ok_or_else(|| Error::InvalidAssetsBinPath("Must not be in root dir".into()))?;

    if parent.is_dir() {
        return Ok(());
    }
    std::fs::create_dir_all(parent).map_err(|e| {
        Error::IO(format!(
            "creating output directory {} for assets: {}",
            output_path.display(),
            e.to_string()
        ))
    })?;
    Ok(())
}
/// create the parent dir of the output file, if it doesn't exist already
create the parent dir of the output file, if it doesn't exist already
create the parent dir of the output file if it doesn ' t exist already
fn mkdir_bin_parent(output_path: &Path) -> Result<(), Error> {
    if output_path.is_file() {
        return Ok(());
    }
    let parent = output_path
        .parent()
        .ok_or_else(|| Error::InvalidAssetsBinPath("Must not be in root dir".into()))?;
    if parent.is_dir() {
        return Ok(());
    }
    std::fs::create_dir_all(parent).map_err(|e| {
        Error::IO(format!(
            "creating output directory {} for assets: {}",
            output_path.display(),
            e.to_string()
        ))
    })?;
    Ok(())
}
fn mkdir_bin_parent ( output_path : & Path ) -> Result < ( ) , Error > { if output_path . is_file ( ) { return Ok ( ( ) ) ; } let parent = output_path . parent ( ) . ok_or_else ( | | Error :: InvalidAssetsBinPath ( " " . into ( ) ) ) ? ; if parent . is_dir ( ) { return Ok ( ( ) ) ; } std :: fs :: create_dir_all ( parent ) . map_err ( | e | { Error :: IO ( format ! ( " " output_path display ( ) e to_string ( ) ) ) } ) ? ; Ok ( ( ) ) }
create the parent dir of the output file, if it doesn't exist already
create the parent dir of the output file if it doesn ' t exist already
output_path
&Path
output_path
&Path