diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-04 14:28:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 14:28:42 -0400 |
commit | 5270c43e412cc636cd9923182169d166d181f78a (patch) | |
tree | 640c90a70f7dd7bc91f5e942e1eaa5a7914ae46b /core/resources.rs | |
parent | 4b645676d62fd595ecac47e24be1b83a3ba636c6 (diff) |
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<dyn File>`.
Diffstat (limited to 'core/resources.rs')
-rw-r--r-- | core/resources.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<Self>) -> Option<std::os::windows::io::RawHandle> { + None + } + fn size_hint(&self) -> (u64, Option<u64>) { (0, None) } |