Skip to main content

find_and_parse

Function find_and_parse 

Source
pub fn find_and_parse<P: AsRef<Path>>(
    start_dir: Option<P>,
) -> Result<FafFile, FindError>
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),
}