pub fn parse_file<P, B, T>(file: P, base_dir: B, template_dir: T, cached: bool, cache_dir: Option<&str>) -> String
    where
        P: AsRef<Path>,
        B: AsRef<Path> + Display + Clone,
        T: AsRef<Path> + Display + Clone {
    if cached {
        make_dirs(&PathBuf::from(cache_dir.unwrap()))
    }
    _parse_file(file, base_dir, template_dir, cached).replace("\\%", "%")
}
/// Parses a Pufferfish file, replacing the template strings with the correct files.
///
/// # Parameters
/// - `file`: The filename of the file where the templates should be replaced
/// - `base_dir`: The base directory for the `file` parameter
/// - `template_dir`: The base directory for the files to be replaced
/// - `cached`: Whether to use cached templates
/// - `cache_dir`: needs to be specified if cached is set to true
Parses a Pufferfish file, replacing the template strings with the correct files.
Parses a Pufferfish file replacing the template strings with the correct files .
pub fn parse_file<P, B, T>(file: P, base_dir: B, template_dir: T, cached: bool, cache_dir: Option<&str>) -> String
    where
        P: AsRef<Path>,
        B: AsRef<Path> + Display + Clone,
        T: AsRef<Path> + Display + Clone {
    if cached {
        make_dirs(&PathBuf::from(cache_dir.unwrap()))
    }
    _parse_file(file, base_dir, template_dir, cached).replace("\\%", "%")
}
pub fn parse_file < P , B , T > ( file : P , base_dir : B , template_dir : T , cached : bool , cache_dir : Option < & str > ) -> String where P : AsRef < Path > , B : AsRef < Path > + Display + Clone , T : AsRef < Path > + Display + Clone { if cached { make_dirs ( & PathBuf :: from ( cache_dir . unwrap ( ) ) ) } _parse_file ( file , base_dir , template_dir , cached ) . replace ( " \\ " , " " ) }
Parses a Pufferfish file, replacing the template strings with the correct files.
Parses a Pufferfish file replacing the template strings with the correct files .
file
P
base_dir
B
template_dir
T
cached
bool
cache_dir
Option<&str>
file
P
The filename of the file where the templates should be replaced
The filename of the file where the templates should be replaced
base_dir
B
The base directory for the `file` parameter
The base directory for the ` file ` parameter
template_dir
T
The base directory for the files to be replaced
The base directory for the files to be replaced
cached
bool
Whether to use cached templates
Whether to use cached templates
cache_dir
Option<&str>
needs to be specified if cached is set to true
needs to be specified if cached is set to true