forked from mirrors/tar-split
archive/tar: adding from go as of a9dddb53f
This commit is contained in:
parent
70b9150cff
commit
64426b0aae
23 changed files with 3195 additions and 0 deletions
20
archive/tar/stat_atimespec.go
Normal file
20
archive/tar/stat_atimespec.go
Normal file
|
@ -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())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue