6.7 API for Paths Relative to "collects"
Checks whether path
has a prefix that matches the prefix to
the main "collects"
directory as determined by
. If so, the result is a list starting
and containing the remaining path elements as
byte strings. If not, the path is returned as-is.
The path argument should be a complete path. Applying
simplify-path before path->main-collects-relative is
usually a good idea.
For historical reasons, path can be a byte string, which is
converted to a path using bytes->path.
For historical reasons, a single byte string is allowed in place of a
list of byte strings after 'collects, in which case it is
assumed to be a relative path after conversion with
Also for historical reasons, if rel is any kind of value other
than specified in the contract above, it is returned as-is.