Search results

There are no results.

std.env.executable

Show source code
Hide source code
fn pub executable -> Result[Path, Error] {
  match inko_env_executable(_INKO.state) {
    case { @tag = 0, @value = val } -> Result.Ok(Path.new(val as String))
    case { @tag = _, @value = err } -> {
      Result.Error(Error.from_os_error(err as Int))
    }
  }
}
fn pub static executable -> Result[Path, Error]

Returns the path to the current executable.

If the program is executed through a symbolic link, the returned path may point to the symbolic link instead of the executable the link points to.