Weave documentation
Rust referenceweave-loom

weave-loom · paths

Source declarations, signatures and documentation for paths.

Source: sigil/weave/tools/loom/src/paths.rs. SHA-256: aa13a3ac8fb589f299220b276109422a1f94ff456f365aa6a5cebd7c0bd98b4b.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

paths::LOOM_DIR

The hidden directory name that marks a loom repository, analogous to .git.

pub const LOOM_DIR: &str;

Source line: 11.

paths::files

File names within .loom/.

pub mod files;

Source line: 14.

paths::files::CONFIG

Repo configuration (TOML).

pub const CONFIG: &str;

Source line: 16.

paths::files::HEAD

Reference to the current branch (analogous to git's HEAD).

pub const HEAD: &str;

Source line: 18.

paths::files::IDENTITY

Subdirectory holding the agent identity for this repository.

pub const IDENTITY: &str;

Source line: 20.

paths::files::WEAVE

Subdirectory backing this repo's WeaveNode storage.

pub const WEAVE: &str;

Source line: 22.

paths::files::REMOTES

File listing remotes (TOML).

pub const REMOTES: &str;

Source line: 24.

paths::files::ACCESS

Repository access manifest (TOML).

pub const ACCESS: &str;

Source line: 26.

paths::files::KEYRING

Wrapped repository key envelopes (TOML).

pub const KEYRING: &str;

Source line: 28.

paths::files::ACCESS_PIN

Highest locally accepted signed access revision and trusted admins.

pub const ACCESS_PIN: &str;

Source line: 30.

paths::files::ACCESS_TRANSACTION

Recoverable two-file transaction joining access manifest and trust pin.

pub const ACCESS_TRANSACTION: &str;

Source line: 32.

paths::files::ENCRYPTION_IDENTITY

Sealed-box encryption identity file.

pub const ENCRYPTION_IDENTITY: &str;

Source line: 34.

paths::files::GATEWAY_TOKEN

Local HTTP gateway bearer capability.

pub const GATEWAY_TOKEN: &str;

Source line: 36.

paths::resources

Names of canonical Weave resources used by a loom repo. Stable across versions so existing repos remain readable.

pub mod resources;

Source line: 41.

paths::resources::COMMITS_TRACE

The Strand that holds commits.

pub const COMMITS_TRACE: &str;

Source line: 43.

paths::resources::BLOBS_DRIVE

The Locus drive that holds blob content (content-addressed).

pub const BLOBS_DRIVE: &str;

Source line: 45.

paths::resources::REFS_LENS

The Lens database that holds refs (HEAD, branches, tags).

pub const REFS_LENS: &str;

Source line: 47.

paths::resources::INDEX_LENS

The Lens database that holds the staging index.

pub const INDEX_LENS: &str;

Source line: 49.

paths::find_repo_root

Find the loom repository root walking up from start.

Returns the path to the directory containing .loom/, or [LoomError::NotARepository] if none is found before reaching the filesystem root.

pub fn find_repo_root(start: &Path) -> Result<PathBuf>;

Source line: 57.

paths::discover

Find the loom repo root from the current working directory.

pub fn discover() -> Result<PathBuf>;

Source line: 81.

paths::require_safe_loom_dir

Require .loom to be a real directory rather than a symlink or other reparseable file type before any repository-owned path is opened.

pub fn require_safe_loom_dir(workdir: &Path) -> Result<()>;

Source line: 88.

paths::access_transaction_path

Recoverable access manifest + trust-pin transaction journal.

pub fn access_transaction_path(workdir: &Path) -> PathBuf;

Source line: 104.

paths::validate_worktree_relative_path

Validate a repository-relative worktree path received from an index or replicated manifest.

The private profile deliberately accepts one portable subset: forward slash separated normal components, no empty/dot/parent component, no platform prefix, and no .loom metadata component.

pub fn validate_worktree_relative_path(value: &str) -> Result<PathBuf>;

Source line: 114.

paths::write_worktree_file

Write one worktree file without following an existing final symlink and only after every parent resolves beneath the canonical repository root.

pub fn write_worktree_file(
    workdir: &Path,
    relative: &str,
    bytes: &[u8],
    executable: bool,
) -> Result<PathBuf>;

Source line: 201.

paths::rename_worktree_file

Atomically rename one regular worktree file without replacing an existing destination. Both parent walks are descriptor-relative and no-follow.

pub fn rename_worktree_file(workdir: &Path, source: &str, destination: &str) -> Result<()>;

Source line: 227.

paths::read_worktree_file

Read one worktree file after the same path and symlink-parent checks used for materialization.

pub fn read_worktree_file(workdir: &Path, relative: &str) -> Result<Vec<u8>>;

Source line: 245.

paths::read_worktree_file_with_mode

Read one worktree file and its executable mode from the same no-follow descriptor, preventing content/mode comparisons from spanning two inodes.

pub fn read_worktree_file_with_mode(workdir: &Path, relative: &str) -> Result<(Vec<u8>, bool)>;

Source line: 251.

paths::remove_worktree_file

Remove one indexed worktree path without allowing parent traversal.

pub fn remove_worktree_file(workdir: &Path, relative: &str) -> Result<()>;

Source line: 267.

paths::loom_dir

Path to the .loom/ dir given a workdir root.

pub fn loom_dir(workdir: &Path) -> PathBuf;

Source line: 584.

paths::weave_dir

Path to the WeaveNode storage for this repo.

pub fn weave_dir(workdir: &Path) -> PathBuf;

Source line: 589.

paths::identity_dir

Path to the identity dir.

pub fn identity_dir(workdir: &Path) -> PathBuf;

Source line: 594.

paths::config_path

Path to the repo config.

pub fn config_path(workdir: &Path) -> PathBuf;

Source line: 599.

paths::access_manifest_path

Path to the repo access manifest.

pub fn access_manifest_path(workdir: &Path) -> PathBuf;

Source line: 604.

paths::keyring_path

Path to the wrapped repo keyring.

pub fn keyring_path(workdir: &Path) -> PathBuf;

Source line: 609.

paths::access_pin_path

Path to the local access rollback/trust pin.

pub fn access_pin_path(workdir: &Path) -> PathBuf;

Source line: 614.

paths::encryption_identity_path

Path to the local sealed-box encryption identity.

pub fn encryption_identity_path(workdir: &Path) -> PathBuf;

Source line: 619.

paths::gateway_token_path

Path to the local HTTP gateway bearer capability.

pub fn gateway_token_path(workdir: &Path) -> PathBuf;

Source line: 624.

paths::head_path

Path to the HEAD file.

pub fn head_path(workdir: &Path) -> PathBuf;

Source line: 629.

paths::relativize

Strip the workdir prefix from path to produce a repo-relative path.

Returns [LoomError::PathOutsideRepo] if path does not live within workdir.

pub fn relativize(workdir: &Path, path: &Path) -> Result<PathBuf>;

Source line: 637.

On this page