Adding crate_root_path to crate_graph

This commit is contained in:
Bruno Ortiz 2023-04-08 13:07:25 -03:00
parent 8e687f7afb
commit a3081a6774
10 changed files with 74 additions and 37 deletions

View file

@ -213,6 +213,13 @@ impl AbsPath {
pub fn exists(&self) -> bool {
self.0.exists()
}
pub fn name_and_extension(&self) -> Option<(&str, Option<&str>)> {
Some((
self.file_stem()?.to_str()?,
self.extension().and_then(|extension| extension.to_str()),
))
}
// endregion:delegate-methods
}