diff options
Diffstat (limited to 'app/stat-darwin.go')
| -rw-r--r-- | app/stat-darwin.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/stat-darwin.go b/app/stat-darwin.go new file mode 100644 index 0000000..f3e05bc --- /dev/null +++ b/app/stat-darwin.go @@ -0,0 +1,15 @@ +//go:build darwin +// +build darwin + +package app + +import ( + "syscall" + "time" +) + +// macOS names the ctime field Ctimespec rather than Ctim, so it needs its own +// variant to let the project build and test on a Mac (deploys are Linux). +func statTime(stat *syscall.Stat_t) int64 { + return time.Unix(stat.Ctimespec.Unix()).UnixMilli() +} |
