mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
23 lines
547 B
Go
23 lines
547 B
Go
|
// Copyright (C) 2022 The Syncthing Authors.
|
||
|
//
|
||
|
// 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/.
|
||
|
|
||
|
//go:build darwin || freebsd || netbsd
|
||
|
// +build darwin freebsd netbsd
|
||
|
|
||
|
package fs
|
||
|
|
||
|
import (
|
||
|
"syscall"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func (fi basicFileInfo) InodeChangeTime() time.Time {
|
||
|
if sys, ok := fi.FileInfo.Sys().(*syscall.Stat_t); ok {
|
||
|
return time.Unix(0, sys.Ctimespec.Nano())
|
||
|
}
|
||
|
return time.Time{}
|
||
|
}
|