Skip to content

Commit

Permalink
chore(core/blocking_operator): deduplicate deprecated is_exist logic (
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsan authored Oct 31, 2024
1 parent e5076ac commit fe48918
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions core/src/types/operator/blocking_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> {
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.
Expand Down

0 comments on commit fe48918

Please sign in to comment.