diff --git a/core/src/types/operator/blocking_operator.rs b/core/src/types/operator/blocking_operator.rs index 47f48d016512..38a95357f653 100644 --- a/core/src/types/operator/blocking_operator.rs +++ b/core/src/types/operator/blocking_operator.rs @@ -306,14 +306,7 @@ impl BlockingOperator { /// ``` #[deprecated(note = "rename to `exists` for consistence with `std::fs::exists`")] pub fn is_exist(&self, path: &str) -> Result { - let r = self.stat(path); - match r { - Ok(_) => Ok(true), - Err(err) => match err.kind() { - ErrorKind::NotFound => Ok(false), - _ => Err(err), - }, - } + self.exists(path) } /// Create a dir at given path.