path
Path utilities.
Types
_None._
Functions
join(foreign parts: Vec[String], r: Region) -> String
Join path segments using the platform separator.
Parameters
foreign parts: Vec[String]- Path segments to join.r: Region- Allocation region for the result.
Returns
- Combined path string.
Notes
- Empty segments are ignored.
---
basename(foreign path: String, r: Region) -> String
Return the last path component.
Parameters
foreign path: String- Input path.r: Region- Allocation region for the result.
Returns
- Last path component, or an empty string for root-like inputs.
---
dirname(foreign path: String, r: Region) -> String
Return the parent directory.
Parameters
foreign path: String- Input path.r: Region- Allocation region for the result.
Returns
- Parent directory path.
Notes
- Root-like inputs are kept stable.
- A path with no directory component returns
".".
---
extname(foreign path: String, r: Region) -> String
Return the extension of the last path component.
Parameters
foreign path: String- Input path.r: Region- Allocation region for the result.
Returns
- Extension text including the leading dot, or
""when no extension exists.
---
is_absolute(path: String) -> bool
Return whether path is absolute.
Parameters
path: String- Input path.
Returns
trueif the path is absolute, otherwisefalse.
Notes
- Windows paths accept both
\and/separators. - Drive-root forms such as
C:\fooare treated as absolute.