Expand description
Path, URI, and hashing utilities shared by the sources, builders, and rules.
Functions§
- hash_
bytes - Hash content with BLAKE3, returning
b3:<hex>. - is_uri
- Check whether a target string is a URI.
- normalize_
relative_ path - Normalize a relative path by resolving
.and..components using path APIs. Does not touch the filesystem. Always returns forward-slash separated paths. Preserves leading..that escape above the root, and preserves an absolute root/prefix (/foo,C:\foo) verbatim — both indicate graph escape and must not be silently rewritten into in-graph relative paths. - relative_
from - Rewrite a root-relative
targetas a link relative tosource_file— the inverse ofresolve_link, for suggesting the path an author meant to write.resolve_link(source, relative_from(source, target)) == target. - resolve_
link - Resolve a link target relative to a source file, producing a path relative to the graph root.