Skip to content

std/path

import "std/path" as path;
FunctionResult
join(a: String, b: String) StringJoins two path segments
basename(path: String) StringLast component of the path
parent(path: String) StringPath without its last component
import "std/path" as path;
fun main() Int {
var file = path.join("build", "app.o");
println(path.parent(file));
println(path.basename(file));
return 0;
}

These functions manipulate path text. They do not access the file system or canonicalize a path.