OxL Reference

method fs.cwd

Current working directory.

Example:

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

fn main() io {
  print("{fs.cwd()!.startsWith("/")}")
}
Output
true
pub(api) static fn cwd() -> str | IoError  io

Since. 1.0.0-beta

Returns

str

Errors

  • IoError @error
  • `IoError` when the working directory was removed.

Effects

io

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

See also