# Struct `kurogane::capability::ScopeBuilder`

```rust
pub struct ScopeBuilder { /* private fields */ }
```

Declares one scope inside [`FilesystemBuilder::scope`](https://kurogane-rs.org/docs/api/capabilities/filesystembuilder.md#method.scope).

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

[crate::capability::FilesystemBuilder::scope]: https://kurogane-rs.org/docs/api/capabilities/filesystembuilder.md#method.scope

## Methods

### `allow_directory`

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

Allows the directory itself and its immediate children.

### `allow_directory_recursive`

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

Allows the directory and its whole subtree.

### `deny_path`

```rust
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.

### `deny_glob`

```rust
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

- `impl Debug for ScopeBuilder`
- `impl Default for ScopeBuilder`

Source: https://github.com/0x48piraj/kurogane/blob/584c586118ee53cc04604007ee038557bd859092/kurogane/src/capability/scope/mod.rs#L47
