OxL Reference

method Path.normalize

Removes . components and folds .. where possible (a/./b/../c -> a/c, /../a -> /a, ../a stays).

Example:

oxl✓ checked in CI
use std.io { Path }

fn main() io {
  print(Path.of("a/./b/../c").normalize().text)
}
Output
a/c
pub(api) fn normalize() -> Path

Since. 1.0.0-beta

Returns

Path

Effects

none declared (pure unless the body says otherwise)

Defined in: std/io/io.oxl:1029

See also