pub fn beamfile_dir(beamfile: &Path) -> PathBufExpand description
The absolute directory holding beamfile: the project root for the
root Beamfile, and its own directory for an imported one.
An empty parent means the current directory, and must be spelled that
way rather than passed on: a bare Beamfile (what alba run resolves
to without --file) has one, notify rejects an empty path outright,
and strip_prefix("") succeeds on any path at all — so an empty root
would leave every displayed path absolute with nothing to signal it.
The one rule, applied both to the roots put under watch and to the root
that paths are displayed against, so the two cannot drift apart.
Lexical: std::path::absolute never requires the directory to exist,
and never resolves symlinks — settling those is [relative_to]’s job,
on the paths a watcher actually reports.