pub fn walk(
        &self,
        directory: impl Into<PathBuf>,
    ) -> impl 'static + FileIterator<Entry = GlobEntry> {
        self.walk_with_behavior(directory, WalkBehavior::default())
    }
Gets an iterator over matching file paths in a directory tree.

This function matches a `Glob` against a directory tree, returning a
[`FileIterator`] that yields a [`GlobEntry`] for each matching file.
`Glob`s are the only [`Pattern`]s that support this semantic
operation; it is not possible to match combinators ([`Any`]) against
directory trees.

As with [`Path::join`] and [`PathBuf::push`], the base directory can be
escaped or overridden by rooted `Glob`s. In many cases, the current
working directory `.` is an appropriate base directory and will be
intuitively ignored if the `Glob` is rooted, such as in `/mnt/media/
**/*.mp4`. The [`has_root`] function can be used to check if a `Glob` is
rooted.

The root directory is either the given directory or, if rooted, the
[invariant prefix][`Glob::partition`] of the `Glob`. Either way,
this function joins the given directory with any invariant prefix to
potentially begin the walk as far down the tree as possible. **The
prefix and any [semantic literals][`Glob::has_semantic_literals`] in
this prefix are interpreted semantically as a path**, so components
like `.` and `..` that precede variant patterns interact with the
base directory semantically. This means that expressions like
`../**` escape the base directory as expected on Unix and Windows, for
example. To query the root directory of the walk, see [`Glob::walker`].

This function uses the default [`WalkBehavior`]. To configure the
behavior of the traversal, see [`Glob::walk_with_behavior`].

Unlike functions in [`Pattern`], **this operation is semantic and
interacts with the file system**.

# Examples

```rust,no_run
use wax::walk::Entry;
use wax::Glob;

let glob = Glob::new("**/*.(?i){jpg,jpeg}").unwrap();
for entry in glob.walk("./Pictures") {
let entry = entry.unwrap();
println!("JPEG: {:?}", entry.path());
}
```

Glob expressions do not support general negations, but the [`not`]
combinator can be used when walking a directory tree to filter
entries using patterns. **This should generally be preferred over
functions like [`Iterator::filter`], because it avoids unnecessary reads
of directory trees when matching [exhaustive
negations][`Pattern::is_exhaustive`].**

```rust,no_run
use wax::walk::{Entry, FileIterator};
use wax::Glob;

let glob = Glob::new("**/*.(?i){jpg,jpeg,png}").unwrap();
for entry in glob
.walk("./Pictures")
.not(["**/(i?){background<s:0,1>,wallpaper<s:0,1>}/**"])
.unwrap()
{
let entry = entry.unwrap();
println!("{:?}", entry.path());
}
```

[`Any`]: crate::Any
[`Glob::walk_with_behavior`]: crate::Glob::walk_with_behavior
[`Glob::walker`]: crate::Glob::walker
[`GlobEntry`]: crate::walk::GlobEntry
[`has_root`]: crate::Glob::has_root
[`FileIterator`]: crate::walk::FileIterator
[`Iterator::filter`]: std::iter::Iterator::filter
[`not`]: crate::walk::FileIterator::not
[`Path::join`]: std::path::Path::join
[`PathBuf::push`]: std::path::PathBuf::push
[`Program`]: crate::Program
[`Program::is_exhaustive`]: crate::Program::is_exhaustive
[`WalkBehavior`]: crate::walk::WalkBehavior
crates/turborepo-wax/src/walk/glob.rs