summaryrefslogtreecommitdiff
path: root/ext/fs/interface.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fs/interface.rs')
-rw-r--r--ext/fs/interface.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs
index 2fdfa2186..09e16aff1 100644
--- a/ext/fs/interface.rs
+++ b/ext/fs/interface.rs
@@ -315,6 +315,9 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync {
fn exists_sync(&self, path: &Path) -> bool {
self.stat_sync(path).is_ok()
}
+ async fn exists_async(&self, path: PathBuf) -> FsResult<bool> {
+ Ok(self.stat_async(path).await.is_ok())
+ }
fn read_text_file_lossy_sync(
&self,