Skip to main content

find_and_parse

Function find_and_parse 

Source
pub fn find_and_parse<P>(start_dir: Option<P>) -> Result<FafFile, FindError>
where P: AsRef<Path>,
Expand description

Find and parse FAF file in one call

Convenience function that combines find_faf_file and parse_file.

§Example

use faf_rust_sdk::find_and_parse;
use std::path::PathBuf;

match find_and_parse::<PathBuf>(None) {
    Ok(faf) => println!("Project: {}", faf.project_name()),
    Err(e) => eprintln!("Error: {}", e),
}