This implements stat device and inode for WASI and GOOS=js, though it does not implement the host side for windows, yet. Doing windows requires plumbing as the values needed aren't exposed in Go. When we re-do the syscallfs file type to have a stat method, we can address that glitch. Meanwhile, I can find no Go sourcebase that does any better, though the closest is the implementation details of os.SameFile. I verified this with wasi-testsuite which now passes all but 1 case which is unrelated (we haven't yet implemented `lseek`). Signed-off-by: Adrian Cole <adrian@tetrate.io>
499 B
499 B