Documentation
¶
Overview ¶
Package cpio implements access to cpio archives. Implementation of the new ASCII formate (SVR4) defined here: http://people.freebsd.org/~kientzle/libarchive/man/cpio.5.txt
Index ¶
Constants ¶
View Source
const ( TYPE_SOCK = 014 TYPE_SYMLINK = 012 TYPE_REG = 010 TYPE_BLK = 006 TYPE_DIR = 004 TYPE_CHAR = 002 TYPE_FIFO = 001 )
File types
View Source
const (
VERSION = "1.1.0"
)
Variables ¶
View Source
var (
ErrInvalidHeader = errors.New("Did not find valid magic number")
)
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
Mode int64 // permission and mode bits.
Uid int // user id of owner.
Gid int // group id of owner.
Mtime int64 // modified time; seconds since epoch.
Size int64 // length in bytes.
Devmajor int64 // major number of character or block device.
Devminor int64 // minor number of character or block device.
Type int64
Name string // name of header file entry.
}
Header represents file meta data in an archive. Some fields may not be populated.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
A writer enables sequential writing of cpio archives. A call to WriteHeader begins a new file. Every call to write afterwards appends to that file, writing at most hdr.Size bytes in total.
func (*Writer) WriteHeader ¶
Click to show internal directories.
Click to hide internal directories.