From 5270c43e412cc636cd9923182169d166d181f78a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 4 May 2023 14:28:42 -0400 Subject: refactor(ext/fs): boxed deno_fs::FileSystem (#18945) 1. Boxed `File` and `FileSystem` to allow more easily passing this through the CLI code (as shown within this pr). 2. `StdFileResource` is now `FileResource`. `FileResource` now contains an `Rc`. --- core/resources.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core') diff --git a/core/resources.rs b/core/resources.rs index 84e6847fc..94d2a2306 100644 --- a/core/resources.rs +++ b/core/resources.rs @@ -187,6 +187,13 @@ pub trait Resource: Any + 'static { None } + /// Resources backed by a file descriptor can let ops know to allow for + /// low-level optimizations. + #[cfg(windows)] + fn backing_fd(self: Rc) -> Option { + None + } + fn size_hint(&self) -> (u64, Option) { (0, None) } -- cgit v1.2.3