diff options
Diffstat (limited to 'cli/state.rs')
-rw-r--r-- | cli/state.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/state.rs b/cli/state.rs index 00337c286..a15d113c8 100644 --- a/cli/state.rs +++ b/cli/state.rs @@ -425,6 +425,17 @@ impl State { self.borrow().permissions.check_read(path) } + /// As `check_read()`, but permission error messages will anonymize the path + /// by replacing it with the given `display`. + #[inline] + pub fn check_read_blind( + &self, + path: &Path, + display: &str, + ) -> Result<(), OpError> { + self.borrow().permissions.check_read_blind(path, display) + } + #[inline] pub fn check_write(&self, path: &Path) -> Result<(), OpError> { self.borrow().permissions.check_write(path) |