Way to get current working directory in `Io`
Ziggit
Way to get current working directory in `Io`
I’m learning the Io interface and be trying to find the corresponding functions in libc, for example, the getcwd(3) C function. I tried two approaches, first std.c.getcwd(), and std.process.currentPath() secondly: const std = @import("std"); const Io = std.Io; pub fn main(init: std.process.Init) !void { const io = init.io; var stdout_buffer: [512]u8 = undefined; var stdout_writer: Io.File.Writer = .init(.stdout(), io, &stdout_buffer); const bw = &stdout_writer.interface; ...
0 comments
No comments yet.