Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer provides sequential writing of an ar archive. An ar archive is sequence of header file pairs Call WriteHeader to begin writing a new file, then call Write to supply the file's data
Example: archive := ar.NewWriter(writer) archive.WriteGlobalHeader() header := new(ar.Header) header.Size = 15 // bytes
if err := archive.WriteHeader(header); err != nil { return err }
io.Copy(archive, data)
func (*Writer) Write ¶
Writes to the current entry in the ar archive Returns ErrWriteTooLong if more than header.Size bytes are written after a call to WriteHeader
func (*Writer) WriteGlobalHeader ¶
func (*Writer) WriteHeader ¶
Writes the header to the underlying writer and prepares to receive the file payload
Click to show internal directories.
Click to hide internal directories.