github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/fstest/times_windows.go (about) 1 package fstest 2 3 import ( 4 "io/fs" 5 "syscall" 6 ) 7 8 func timesFromFileInfo(info fs.FileInfo) (atim, mtime int64) { 9 if d, ok := info.Sys().(*syscall.Win32FileAttributeData); ok { 10 return d.LastAccessTime.Nanoseconds(), d.LastWriteTime.Nanoseconds() 11 } else { 12 panic("unexpected") 13 } 14 }