method
Path.base
Path.base(p) -> string
Returns the final component — the file or last directory name — after the last /. A path with no separator is returned unchanged. The complement of dir.
Parameters
pthe pathExample
program Base {
entry {
if Path.base("mods/foo/data.json") == "data.json" { print(1) }
}
}