So, I’m opening a directory to pass to imgui, expecting a string for a filename in return
var dir = try std.Io.Dir.cwd().openDir(io, “src/shaders/”, .{
.iterate = true,
});
defer dir.close(io);
if (gui.fileMenu(io, dir, “shaders”)) |selected_file| {
std.debug.print("{s}\n", .{ selected_file });
const _file = try dir.readFileAlloc(
io,
selected_file,
arena.allocator(),
.unlimited,
);
I get a file not found error, even though the file name prints correctly. Dir.cwd() must be getting the right subdirectory for the gui to iterate over files, is there a way to get the subdirectory pointed at by dir to check?