OxL Reference

method Path.isAbsolute

Whether the path starts with /.

Example:

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

fn main() io {
  print("{Path.of("/a").isAbsolute()} {Path.of("a").isAbsolute()}")
}
Output
true false
pub(api) fn isAbsolute() -> bool

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

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

See also