/// Gets an iterator over matching files in a directory tree.
///
/// This function is the same as [`walk`], but it additionally accepts a
/// [`WalkBehavior`]. This can be used to configure how the traversal interacts
/// with symbolic links, the maximum depth from the root, etc.
///
/// # Errors
///
/// Returns an error if the glob expression fails to build. See [`BuildError`].
///
/// # Examples
///
/// ```rust,no_run
/// use wax::LinkBehavior;
///
/// for entry in wax::walk_with_behavior("**/*.txt", "/var/log", LinkBehavior::ReadTarget).unwrap()
/// {
///     let entry = entry.unwrap();
///     println!("Log: {:?}", entry.path());
/// }
/// ```
///
/// [`BuildError`]: crate::BuildError
/// [`walk`]: crate::walk()
/// [`WalkBehavior`]: crate::WalkBehavior
Gets an iterator over matching files in a directory tree.
This function is the same as [`walk`], but it additionally accepts a
[`WalkBehavior`]. This can be used to configure how the traversal interacts
with symbolic links, the maximum depth from the root, etc.
Gets an iterator over matching files in a directory tree . This function is the same as [ ` walk ` ] but it additionally accepts a [ ` WalkBehavior ` ] . This can be used to configure how the traversal interacts with symbolic links the maximum depth from the root etc .
pub fn walk_with_behavior(
    expression: &str,
    directory: impl AsRef<Path>,
    behavior: impl Into<WalkBehavior>,
) -> Result<Walk<'static>, BuildError> {
    let (prefix, glob) = Glob::new(expression)?.partition();
    Ok(glob
        .walk_with_behavior(directory.as_ref().join(prefix), behavior)
        .into_owned())
}
pub fn walk_with_behavior ( expression : & str , directory : impl AsRef < Path > , behavior : impl Into < WalkBehavior > , ) -> Result < Walk < ' static > , BuildError > { let ( prefix , glob ) = Glob :: new ( expression ) ? . partition ( ) ; Ok ( glob . walk_with_behavior ( directory . as_ref ( ) . join ( prefix ) , behavior ) . into_owned ( ) ) }
Gets an iterator over matching files in a directory tree.
Gets an iterator over matching files in a directory tree .
expression
&str
directory
impl AsRef<Path>
behavior
impl Into<WalkBehavior>
errors
Returns an error if the glob expression fails to build. See [`BuildError`].
Returns an error if the glob expression fails to build . See [ ` BuildError ` ] .
examples
```rust,no_run
use wax::LinkBehavior.

for entry in wax::walk_with_behavior("**.txt", "/var/log", LinkBehavior::ReadTarget).unwrap()
{
let entry = entry.unwrap();
println!("Log: {:?}", entry.path());
}
```


` ` ` rust no_run use wax :: LinkBehavior . for entry in wax :: walk_with_behavior ( " ** . txt " " / var / log " LinkBehavior :: ReadTarget ) . unwrap () { let entry = entry . unwrap () ; println! ( " Log : { : ? } " entry . path () ) ; } ` ` `