Menu

Struct

ScopeBuilder

kurogane::capability::ScopeBuilderSource
pub struct ScopeBuilder { /* private fields */ }

Declares one scope inside FilesystemBuilder::scope.

Methods only record; roots are opened and patterns checked when the Filesystem is built.

Methods

#pub fn allow_directory(&mut self, path: impl AsRef<Path>) -> &mut Self

Allows the directory itself and its immediate children.

#pub fn allow_directory_recursive(&mut self, path: impl AsRef<Path>) -> &mut Self

Allows the directory and its whole subtree.

#pub fn deny_path(&mut self, path: impl AsRef<Path>) -> &mut Self

Denies a literal path and everything beneath it. The path is never a pattern, whatever characters it contains. It must lie under one of this scope’s allow roots.

#pub fn deny_glob(&mut self, pattern: impl Into<String>) -> &mut Self

Denies what pattern matches beneath every allow root of this scope (**/.git, **/*.key). Patterns use / on every platform and \ as the escape; a matched directory is denied with its subtree.

Trait implementations