1234567891011121314151617181920212223 |
- //go:build darwin
- /*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/.
- */
- package main
- import (
- "syscall"
- )
- type FileSysInfo = *syscall.Stat_t
- const FileSysInfoStr = "*syscall.Stat_t"
- func fileWasRotated(newSysInfo, curSysInfo FileSysInfo) bool {
- // TODO I hope this is right. :^ Need to test this.
- return newSysInfo.Ino != curSysInfo.Ino ||
- newSysInfo.Size < curSysInfo.Size ||
- newSysInfo.Ctimespec.Nano() > curSysInfo.Ctimespec.Nano()
- }
|