mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
17 lines
297 B
Go
17 lines
297 B
Go
|
//go:build windows
|
||
|
|
||
|
package http
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
func statAtime(sys any) (int64, error) {
|
||
|
x, ok := sys.(*syscall.Win32FileAttributeData)
|
||
|
if !ok {
|
||
|
return 0, fmt.Errorf("sys is a %T, expected *syscall.Win32FileAttributeData", sys)
|
||
|
}
|
||
|
return x.LastAccessTime.Nanoseconds(), nil
|
||
|
}
|