summaryrefslogtreecommitdiff
path: root/ext/node/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r--ext/node/lib.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/node/lib.rs b/ext/node/lib.rs
index 7fa5b893b..547f1d60a 100644
--- a/ext/node/lib.rs
+++ b/ext/node/lib.rs
@@ -50,7 +50,15 @@ pub trait NodePermissions {
url: &Url,
api_name: &str,
) -> Result<(), AnyError>;
- fn check_read(&self, path: &Path) -> Result<(), AnyError>;
+ #[inline(always)]
+ fn check_read(&self, path: &Path) -> Result<(), AnyError> {
+ self.check_read_with_api_name(path, None)
+ }
+ fn check_read_with_api_name(
+ &self,
+ path: &Path,
+ api_name: Option<&str>,
+ ) -> Result<(), AnyError>;
fn check_sys(&self, kind: &str, api_name: &str) -> Result<(), AnyError>;
}
@@ -64,7 +72,11 @@ impl NodePermissions for AllowAllNodePermissions {
) -> Result<(), AnyError> {
Ok(())
}
- fn check_read(&self, _path: &Path) -> Result<(), AnyError> {
+ fn check_read_with_api_name(
+ &self,
+ _path: &Path,
+ _api_name: Option<&str>,
+ ) -> Result<(), AnyError> {
Ok(())
}
fn check_sys(&self, _kind: &str, _api_name: &str) -> Result<(), AnyError> {
@@ -227,6 +239,7 @@ deno_core::extension!(deno_node,
ops::crypto::x509::op_node_x509_get_valid_to,
ops::crypto::x509::op_node_x509_get_serial_number,
ops::crypto::x509::op_node_x509_key_usage,
+ ops::fs::op_node_fs_exists_sync<P>,
ops::winerror::op_node_sys_to_uv_error,
ops::v8::op_v8_cached_data_version_tag,
ops::v8::op_v8_get_heap_statistics,