Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const TypeBlock + const TypeChar + const TypeCont + const TypeDir + const TypeFifo + const TypeGNULongLink + const TypeGNULongName + const TypeGNUSparse + const TypeLink + const TypeReg + const TypeRegA + const TypeSymlink + const TypeXGlobalHeader + const TypeXHeader + var ErrFieldTooLong = errors.New("archive/tar: header field too long") + var ErrHeader = errors.New("archive/tar: invalid tar header") + var ErrWriteAfterClose = errors.New("archive/tar: write after close") + var ErrWriteTooLong = errors.New("archive/tar: write too long") + type Format int + const FormatGNU + const FormatPAX + const FormatUSTAR + const FormatUnknown + func (f Format) String() string + type Header struct + AccessTime time.Time + ChangeTime time.Time + Devmajor int64 + Devminor int64 + Format Format + Gid int + Gname string + Linkname string + ModTime time.Time + Mode int64 + Name string + PAXRecords map[string]string + Size int64 + Typeflag byte + Uid int + Uname string + Xattrs map[string]string + func FileInfoHeader(fi fs.FileInfo, link string) (*Header, error) + func (h *Header) FileInfo() fs.FileInfo + type Reader struct + func NewReader(r io.Reader) *Reader + func (tr *Reader) Next() (*Header, error) + func (tr *Reader) Read(b []byte) (int, error) + type Writer struct + func NewWriter(w io.Writer) *Writer + func (tw *Writer) Close() error + func (tw *Writer) Flush() error + func (tw *Writer) Write(b []byte) (int, error) + func (tw *Writer) WriteHeader(hdr *Header) error