Skip to main content

resolve_file

Function resolve_file 

Source
pub fn resolve_file(
    selector: &ParsedSelector,
    project_root: &Path,
) -> Result<(PathBuf, String), String>
Expand description

Resolve a selector’s file path against a project root, and return the absolute path along with the file extension (for language detection).

§Errors

Returns an error if the selected file does not exist or has no extension.