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.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs
index 474089153..2d9b68f55 100644
--- a/ext/fs/interface.rs
+++ b/ext/fs/interface.rs
@@ -11,6 +11,9 @@ use deno_io::fs::File;
use deno_io::fs::FsResult;
use deno_io::fs::FsStat;
+use crate::sync::MaybeSend;
+use crate::sync::MaybeSync;
+
#[derive(Deserialize, Default, Debug, Clone, Copy)]
#[serde(rename_all = "camelCase")]
#[serde(default)]
@@ -72,8 +75,11 @@ pub struct FsDirEntry {
pub is_symlink: bool,
}
+#[allow(clippy::disallowed_types)]
+pub type FileSystemRc = crate::sync::MaybeArc<dyn FileSystem>;
+
#[async_trait::async_trait(?Send)]
-pub trait FileSystem: std::fmt::Debug + Send + Sync {
+pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync {
fn cwd(&self) -> FsResult<PathBuf>;
fn tmp_dir(&self) -> FsResult<PathBuf>;
fn chdir(&self, path: &Path) -> FsResult<()>;