Skip to main content

acquire_in

Function acquire_in 

Source
pub fn acquire_in(dir: &Path, target: &Utf8Path) -> Result<TargetLock, RkError>
Expand description

The acquisition against one locks directory, which is what the tests drive so no test has to move the state root out from under itself.

The target must exist and resolve: the lock is keyed by the canonical path and carries the directory’s identity, so a target that cannot be resolved has no lock to take and refuses, rather than being keyed by the text it was named with while another run keys the same directory by its canonical path. The canonical path is digested rather than flattened, so a path carrying a separator cannot name another target’s lock.

§Errors

As acquire, and RkError::Missing naming a target that does not resolve to a directory.