Files
yatm/internal/executor/tracking_darwin.go
T
Samuel Cui 4fef653b71 Prepare YATM v1.0.0-alpha.2
Unify file queries and Scan execution, retain indexed Identical results,
improve Job and Preview workflows, and verify release packaging.
2026-10-05 19:08:49 +08:00

18 lines
441 B
Go

package executor
import (
"syscall"
"time"
"github.com/samuelncui/yatm/internal/dataformat"
)
func nativeLifetime(stat *syscall.Stat_t) (int64, uint64) {
// Unrepresentable optional birth evidence stays unknown; it must never wrap into another instant.
birth, err := dataformat.Nanoseconds(time.Unix(stat.Birthtimespec.Sec, stat.Birthtimespec.Nsec))
if err != nil {
return 0, uint64(stat.Gen)
}
return birth, uint64(stat.Gen)
}