summaryrefslogtreecommitdiff
path: root/ext/io
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-05 12:44:24 -0400
committerGitHub <noreply@github.com>2023-05-05 16:44:24 +0000
commita6c47ee74023f6ef683988cabc8caa95406e3c99 (patch)
tree74026c558a175b9cf6f881ec7229499878dd6a1a /ext/io
parent5270c43e412cc636cd9923182169d166d181f78a (diff)
refactor(ext/node): combine `deno_node::Fs` with `deno_fs::FileSystem` (#18991)
Diffstat (limited to 'ext/io')
-rw-r--r--ext/io/fs.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/io/fs.rs b/ext/io/fs.rs
index bb6bdec4f..a333e1dd5 100644
--- a/ext/io/fs.rs
+++ b/ext/io/fs.rs
@@ -21,6 +21,16 @@ pub enum FsError {
NotSupported,
}
+impl FsError {
+ pub fn kind(&self) -> io::ErrorKind {
+ match self {
+ Self::Io(err) => err.kind(),
+ Self::FileBusy => io::ErrorKind::Other,
+ Self::NotSupported => io::ErrorKind::Other,
+ }
+ }
+}
+
impl From<io::Error> for FsError {
fn from(err: io::Error) -> Self {
Self::Io(err)