12345678910111213141516171819202122 |
- //go:build linux
- /*
- * 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 {
- return newSysInfo.Ino != curSysInfo.Ino ||
- newSysInfo.Size < curSysInfo.Size ||
- newSysInfo.Ctim.Nano() > curSysInfo.Ctim.Nano()
- }
|