summaryrefslogtreecommitdiff
path: root/pkg/ctime/ctime_linux.go
blob: e83269d490430edf7d758e0b9300e5890b83339a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// +build linux

package ctime

import (
	"os"
	"syscall"
	"time"
)

func created(fi os.FileInfo) time.Time {
	st := fi.Sys().(*syscall.Stat_t)
	return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec))
}