The only field in std.fs.File is Handle, which is of type std.posix.fd_t, which is a child of the system type, which is assigned from a switch on the OS. On macOS without using libc the system type is just an empty struct. Additionally, looking at the code for opening files, all that is done is opening the fd_t using a function defined also in system type. I guess my question overall is, how are files read on macOS when std.posix.system is an empty struct?
Also yes I know the x-y problem, I actually just need to know how to get the file path of a file that has already been opened, for porting an existing library to non-Linux.