Enum wax::walk::LinkBehavior
source · pub enum LinkBehavior {
ReadFile,
ReadTarget,
}
walk
only.Expand description
Configuration for interpreting symbolic links.
Determines how symbolic links are interpreted when walking directory trees using functions like
Glob::walk_with_behavior
. By default, symbolic links are read as regular files and their
targets are ignored.
Variants§
ReadFile
Read the symbolic link file itself.
This behavior reads the symbolic link as a regular file. The corresponding entry uses the path of the link file and its metadata describes the link file itself. The target is effectively ignored and traversal does not follow the link.
ReadTarget
Read the target of the symbolic link.
This behavior reads the target of the symbolic link. The corresponding entry uses the path of the link file and its metadata describes the target. If the target is a directory, then traversal follows the link and descend into the target.
If a link is reentrant and forms a cycle, then an error will be emitted instead of an entry and traversal does not follow the link.
Trait Implementations§
source§impl Clone for LinkBehavior
impl Clone for LinkBehavior
source§fn clone(&self) -> LinkBehavior
fn clone(&self) -> LinkBehavior
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LinkBehavior
impl Debug for LinkBehavior
source§impl Default for LinkBehavior
impl Default for LinkBehavior
source§fn default() -> LinkBehavior
fn default() -> LinkBehavior
source§impl From<LinkBehavior> for WalkBehavior
impl From<LinkBehavior> for WalkBehavior
source§fn from(link: LinkBehavior) -> Self
fn from(link: LinkBehavior) -> Self
source§impl PartialEq<LinkBehavior> for LinkBehavior
impl PartialEq<LinkBehavior> for LinkBehavior
source§fn eq(&self, other: &LinkBehavior) -> bool
fn eq(&self, other: &LinkBehavior) -> bool
self
and other
values to be equal, and is used
by ==
.