...

Source file src/github.com/tetratelabs/wazero/internal/fstest/times_windows.go

Documentation: github.com/tetratelabs/wazero/internal/fstest

     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  }
    15  

View as plain text