summaryrefslogtreecommitdiff
path: root/src/archive/tar/stat_atimespec.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive/tar/stat_atimespec.go')
-rw-r--r--src/archive/tar/stat_atimespec.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/archive/tar/stat_atimespec.go b/src/archive/tar/stat_atimespec.go
new file mode 100644
index 000000000..6f17dbe30
--- /dev/null
+++ b/src/archive/tar/stat_atimespec.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build darwin freebsd netbsd
+
+package tar
+
+import (
+ "syscall"
+ "time"
+)
+
+func statAtime(st *syscall.Stat_t) time.Time {
+ return time.Unix(st.Atimespec.Unix())
+}
+
+func statCtime(st *syscall.Stat_t) time.Time {
+ return time.Unix(st.Ctimespec.Unix())
+}