predicates::path

Function exists

Source
pub fn exists() -> ExistencePredicate
Expand description

Creates a new Predicate that ensures the path exists.

ยงExamples

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

let predicate_fn = predicate::path::exists();
assert_eq!(true, predicate_fn.eval(Path::new("Cargo.toml")));