API Reference › Path › Path.join
method

Path.join

Path.join(a, b) -> string

Joins two path segments with a single /, inserting one only when needed (so join("a/", "b") and join("a", "b") both give a/b). If b is absolute it wins; if either side is empty the other is returned.

Parameters

athe leading path
bthe trailing path or filename

Example

program Join {
  entry {
    if Path.join("mods", "foo.ludic") == "mods/foo.ludic" { print(1) }
  }
}
← All symbols