Function html5_picture::path::create_output_file_name[][src]

pub fn create_output_file_name(
    base_dir: &PathBuf,
    input_file: &PathBuf
) -> Result<PathBuf, String>

Generates an output file name that is stored in the output working directory.

Example

use {
    html5_picture::path::create_output_file_name,
    std::path::PathBuf,
};

let base_dir = PathBuf::from("../assets");
let input_file = PathBuf::from("../assets/some/picture.png");
let output_file = create_output_file_name(&base_dir, &input_file).unwrap();
assert_eq!(output_file.to_str().unwrap(), "../assets-html5picture/some/picture.png");