pub fn config_files(dir: &str) -> Result<Vec<PathBuf>> {
	fs::read_dir(dir)
		.with_context(|| format!("Browsing config dir {}", dir))?
		.map(|r| r.map_err(anyhow::Error::from).map(|d| d.path()))
		.filter(|r| r.is_ok() && is_conffile(r.as_deref().unwrap()))
		.collect()
}
/// Return the list of config files names inside dir
/// TODO: use generics to return iterator
Return the list of config files names inside dir
TODO: use generics to return iterator
Return the list of config files names inside dir TODO : use generics to return iterator
pub fn config_files(dir: &str) -> Result<Vec<PathBuf>> {
	fs::read_dir(dir)
		.with_context(|| format!("Browsing config dir {}", dir))?
		.map(|r| r.map_err(anyhow::Error::from).map(|d| d.path()))
		.filter(|r| r.is_ok() && is_conffile(r.as_deref().unwrap()))
		.collect()
}
pub fn config_files ( dir : & str ) -> Result < Vec < PathBuf > > { fs :: read_dir ( dir ) . with_context ( | | format ! ( " " dir ) ) ? . map ( | r | r . map_err ( anyhow :: Error :: from ) . map ( | d | d . path ( ) ) ) . filter ( | r | r . is_ok ( ) && is_conffile ( r . as_deref ( ) . unwrap ( ) ) ) . collect ( ) }
Return the list of config files names inside dir
TODO: use generics to return iterator
Return the list of config files names inside dir TODO : use generics to return iterator
dir
&str
dir
&str