OxL Reference

method fs.realpath

Absolute path with symbolic links and ./.. resolved; the path must exist.

Example:

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

fn main() io {
  print(fs.realpath("/tmp/../tmp")!)
}
Output
/tmp
pub(api) static fn realpath(path: str) -> str | IoError  io

Since. 1.0.0-beta

Parameters

NameType
pathstr

Returns

str

Errors

  • IoError @error
  • `IoError` (`NotFound` when the path does not exist).

Effects

io

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

See also