Skip to main content

is_not_found

Function is_not_found 

Source
pub fn is_not_found(err: &Error) -> bool
Expand description

Returns true when an io::Error indicates the path referenced by an operation does not exist (ENOENT on Unix, ERROR_FILE_NOT_FOUND / ERROR_PATH_NOT_FOUND on Windows). Use this only at call sites where the operation expected the path to exist — the predicate alone can’t distinguish “I expected this” from “I checked optionally”.