Utilities
Paths and the package overview.
Files: paths.odin, doc.odin.
Procedures
Section titled “Procedures”JoinPath
Section titled “JoinPath”JoinPath :: proc(parts: ..string) -> stringJoins path parts with “/” (“a” + “b” -> “a/b”). The engine’s own: core:path/filepath needs
core:os, which the web build doesn’t have. Paths in project files always use “/”.
Empty parts are skipped; a later part’s leading “/” is dropped once something is written (so an absolute path after empty parts stays absolute), and no “/” is doubled after a part that ends in one.
Inputs
- parts: The parts, in order
Returns
- The joined path (temp allocated)
Example
path := e.JoinPath(game.projectDir, "assets", "ship.png")_ = pathprocedure. Source: paths.odin:23
