github.com/anthropics/anthropic-sdk-go@v1.70.1/internal/filestore/filestore_ctime_ctimespec.go (about)

     1  //go:build darwin || freebsd || netbsd
     2  
     3  package filestore
     4  
     5  import (
     6  	"os"
     7  	"syscall"
     8  )
     9  
    10  // ctimeNs is fi's inode change time in nanoseconds — see hashEntry.
    11  // These GOOS values spell the syscall.Stat_t field Ctimespec.
    12  func ctimeNs(fi os.FileInfo) int64 {
    13  	return fi.Sys().(*syscall.Stat_t).Ctimespec.Nano()
    14  }