The Stat struct seems to be missing uid/gid fields.
I can always get them from posix versions of stat, but that’s no good (want to scan dirs and batch stat syscalls with the new shiny async, which in my understanding should work fine with evented IO).
std.Io provides platform specific implementations such as e.g. io_uring support for Linux.
If I need both stat and std.Io evented features, I would likely need to write my own std.Id layer but also cannot use the standard abstractions (Stat). I don’t think I can batch std.linux.stat syscalls in evented.
mode is a UNIX concept, ctime is. Attributes are a windows concept. All of these are handled in std.Io, despite them being platform specific.
I don’t think that it’s a good choice to favor portability to this extend. If you do, std.Io would become a portability abstraction layer of smallest common denominator, not the fundamental IO abstraction it can and should be.
I leave this open, because while the topic is a duplicate, my problem is not that I didn’t find the linux stat impl, but that I can’t integrate it into std.Io. So the solution to the other issue does not really apply here.
This could just be comptime variants? Optionals eat memory.
Alternatively: Posix covers almost the entirety of non-Windows OS. I don’t see why Windows and POSIX functionality need to be merged into a single abstraction, making both Windows and UNIX system pay an overhead they never really benefit from (you need to discriminate over the OS anyway for non-trivial features).
I believe the point of Io is not to abstract only over the chosen concurrency / synchronicity / parralelism, but also to abstract over different implementation and / or backends. The goal here is to write reusable programs.