From a6c47ee74023f6ef683988cabc8caa95406e3c99 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 5 May 2023 12:44:24 -0400 Subject: refactor(ext/node): combine `deno_node::Fs` with `deno_fs::FileSystem` (#18991) --- ext/io/fs.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/io') 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 for FsError { fn from(err: io::Error) -> Self { Self::Io(err) -- cgit v1.2.3