On this page:
Collection  String
file_  path
path
8.16.0.4

17.4 Module Collection Paths🔗ℹ

 import: rhombus/collect package: rhombus-lib

annotation

collect.CollectionString

Satisfied by a String that conforms to the syntax of a collection path: containing only the characters a-z, A-Z, 0-9, -, +, _, /, or %. A % is allowed only when followed by two lowercase hexadecimal digits, and the digits must form a number that is not the ASCII value of a letter, digit, -, +, or _.

function

fun collect.file_path(

  ~collect: coll :: collect.CollectionString,

  ~file: file ::  PathString.to_path && Path.Relative,

  ~infer_from_compiled: infer :: Any.to_boolean

) :: maybe(Path)

Reports a path for file within the collection named by coll. Note that the location of coll is itself is not necessarily unique, since multiple packages may supply modules for the collection, but each file within a collection is meant to be unique (and the package system rejects conflicts).

function

fun collect.path(coll :: collect.CollectionString) :: maybe(Path)

Reports a directory path for the collection named by coll. Beware that coll is not necessarily unique, and is collect.file_path is normally a better choice.