pub struct EffectivePathContext { /* private fields */ }Expand description
A runtime path context created by crate::EffectiveSandbox::path_context.
The constructor is intentionally private so a filesystem decision cannot accidentally use a context with workspace roots broader than the composed result.
Implementations§
Source§impl EffectivePathContext
impl EffectivePathContext
Sourcepub fn workspace_roots(&self) -> &[PathBuf]
pub fn workspace_roots(&self) -> &[PathBuf]
Returns the workspace roots permitted by the composed result.
Sourcepub fn root_paths(&self) -> &[PathBuf]
pub fn root_paths(&self) -> &[PathBuf]
Returns the system roots retained by the composed runtime context.
Sourcepub fn minimal_paths(&self) -> &[PathBuf]
pub fn minimal_paths(&self) -> &[PathBuf]
Returns the platform-minimal paths retained by the composed context.
Sourcepub fn tmpdir(&self) -> Option<&Path>
pub fn tmpdir(&self) -> Option<&Path>
Returns the platform temporary directory, if one was supplied.
Sourcepub fn slash_tmp(&self) -> Option<&Path>
pub fn slash_tmp(&self) -> Option<&Path>
Returns the conventional /tmp directory, if one was supplied.
Sourcepub fn current_directory(&self) -> Option<&Path>
pub fn current_directory(&self) -> Option<&Path>
Returns the absolute runtime directory used to resolve or inherit a command working directory.
Sourcepub fn resolve(&self, selector: &PathSelector) -> Vec<PathBuf>
pub fn resolve(&self, selector: &PathSelector) -> Vec<PathBuf>
Resolves a symbolic selector through this bound effective context.
Sourcepub fn glob_search_roots(&self, pattern: &PathPattern) -> Vec<PathBuf>
pub fn glob_search_roots(&self, pattern: &PathPattern) -> Vec<PathBuf>
Returns the concrete scan roots for one validated filesystem pattern.
Workspace patterns are resolved only through the roots retained by this effective context. Absolute patterns produce their own static prefix. The roots are lexical scan anchors, not filesystem authorization.
Sourcepub fn pattern_matches(&self, pattern: &PathPattern, path: &Path) -> bool
pub fn pattern_matches(&self, pattern: &PathPattern, path: &Path) -> bool
Tests a path pattern through this composition-bound runtime context.
This method preserves workspace-root narrowing. It is a matcher used by native lowering and is not an authorization result; the final path must still be checked against the complete effective filesystem policy.
Trait Implementations§
Source§impl Clone for EffectivePathContext
impl Clone for EffectivePathContext
Source§fn clone(&self) -> EffectivePathContext
fn clone(&self) -> EffectivePathContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more