Generate render link based on path to file.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::error::CustomError;
|
||||
@@ -33,4 +34,13 @@ impl DependencyManager {
|
||||
.expect("Popped more files off the dependency manager file stack than exist.");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn get_current_folder(&self) -> Result<&Path, CustomError> {
|
||||
Ok(self
|
||||
.file_stack
|
||||
.last()
|
||||
.ok_or("No current file")?
|
||||
.parent()
|
||||
.ok_or("Current file was not in a directory")?)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user