Function create_random_svg_file

Source
pub fn create_random_svg_file<P: AsRef<Path>>(path: P) -> Result<()>
Expand description

Convenience function to create a new file at the given path and write a random icon to it.

§Errors

Among other tings returns an error if a file already exists at the given path

§Examples

use random_icon_lib::create_random_svg_file;
 
let path_to_new_file = "./tests/new_random_svg_file.svg";
 
create_random_svg_file(
    path_to_new_file
).unwrap();