Function predicates::path::is_symlink

source ·
pub fn is_symlink() -> FileTypePredicate
Expand description

Creates a new Predicate that ensures the path points to a symlink.

§Examples

use std::path::Path;
use predicates::prelude::*;

let predicate_fn = predicate::path::is_symlink();
assert_eq!(false, predicate_fn.eval(Path::new("Cargo.toml")));
assert_eq!(false, predicate_fn.eval(Path::new("src")));
assert_eq!(false, predicate_fn.eval(Path::new("non-existent-file.foo")));