summaryrefslogtreecommitdiff
path: root/pkg/ctime/ctime_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ctime/ctime_linux.go')
-rw-r--r--pkg/ctime/ctime_linux.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/ctime/ctime_linux.go b/pkg/ctime/ctime_linux.go
new file mode 100644
index 000000000..e83269d49
--- /dev/null
+++ b/pkg/ctime/ctime_linux.go
@@ -0,0 +1,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))
+}