Skip to main content

local_half

Function local_half 

Source
pub fn local_half(root: &Path) -> String
Expand description

The repository-relative path of a checkout’s local half — the directory its lease is written into — or the layer’s default when no manifest can be read at that checkout.

A directory that is not a repository of the layer still gets an answer, because “does a server serve this checkout” is a question about a path and not about a manifest.

use majordomus_cli::capability::builtin::server::local_half;
assert_eq!(local_half(std::path::Path::new("/nonexistent/checkout")), ".ai/local");