use crate::{ListOptions, Result, SPath};
use std::path::Path;
pub fn iter_dirs(
dir: impl AsRef<Path>,
include_globs: Option<&[&str]>,
list_options: Option<ListOptions<'_>>,
) -> Result<impl Iterator<Item = SPath>> {
let iter = super::globs_dir_iter::GlobsDirIter::new(dir, include_globs, list_options)?;
Ok(iter)
}
pub fn list_dirs(
dir: impl AsRef<Path>,
include_globs: Option<&[&str]>,
list_options: Option<ListOptions<'_>>,
) -> Result<Vec<SPath>> {
let iter = iter_dirs(dir, include_globs, list_options)?;
Ok(iter.collect())
}