get_ito_path_fs

Function get_ito_path_fs 

Source
pub fn get_ito_path_fs<F: FileSystem>(
    fs: &F,
    project_root: &Path,
    ctx: &ConfigContext,
) -> PathBuf
Expand description

Resolve the Ito directory path for a project using an injected filesystem.

This absolutizes and lexically normalizes project_root (falling back to a lossy normalization if the current working directory cannot be determined) and appends the Ito directory name selected from repository overrides, global configuration, or the default.

ยงExamples

use ito_common::fs::StdFs;
use ito_config::ConfigContext;
use ito_config::ito_dir::get_ito_path_fs;
use std::path::Path;

let fs = StdFs;
let ctx = ConfigContext::default();
let ito_path = get_ito_path_fs(&fs, Path::new("some/project"), &ctx);
assert!(ito_path.ends_with(".ito"));