Documentation
¶
Index ¶
- Constants
- type ArchiveReader
- func (ar *ArchiveReader) Close() error
- func (ar *ArchiveReader) Hash() []byte
- func (ar *ArchiveReader) Kind() EntryKind
- func (ar *ArchiveReader) Linkname() string
- func (ar *ArchiveReader) ModTime() time.Time
- func (ar *ArchiveReader) Mode() fs.FileMode
- func (ar *ArchiveReader) Name() string
- func (ar *ArchiveReader) NextEntry() error
- func (ar *ArchiveReader) Open() (Handle, error)
- func (ar *ArchiveReader) Owner() (uid, gid int)
- func (ar *ArchiveReader) Size() int64
- type ArchiveWriter
- type Entry
- type EntryFactory
- func (e *EntryFactory) Kind(k EntryKind) *EntryFactory
- func (e *EntryFactory) Linkname(s string) *EntryFactory
- func (e *EntryFactory) ModTime(t time.Time) *EntryFactory
- func (e *EntryFactory) Mode(s fs.FileMode) *EntryFactory
- func (e *EntryFactory) Name(s string) *EntryFactory
- func (e *EntryFactory) Owner(uid, gid int) *EntryFactory
- func (e *EntryFactory) Size(s int64) *EntryFactory
- type EntryKind
- type Handle
Constants ¶
View Source
const (
ArchiveMagic = "ARCHIVE0\n"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveReader ¶
type ArchiveReader struct {
// contains filtered or unexported fields
}
func NewArchiveReader ¶
func (*ArchiveReader) Hash ¶
func (ar *ArchiveReader) Hash() []byte
Hash returns the SHA256 hash of the contents of the entry.
func (*ArchiveReader) Kind ¶
func (ar *ArchiveReader) Kind() EntryKind
Kind returns the kind of the entry.
func (*ArchiveReader) Linkname ¶
func (ar *ArchiveReader) Linkname() string
Linkname returns the linkname of the entry.
func (*ArchiveReader) ModTime ¶
func (ar *ArchiveReader) ModTime() time.Time
ModTime returns the modification time of the entry.
func (*ArchiveReader) Mode ¶
func (ar *ArchiveReader) Mode() fs.FileMode
Mode returns the mode of the entry.
func (*ArchiveReader) Name ¶
func (ar *ArchiveReader) Name() string
Name returns the name of the entry.
func (*ArchiveReader) NextEntry ¶
func (ar *ArchiveReader) NextEntry() error
NextEntry reads the next entry from the index.
func (*ArchiveReader) Open ¶
func (ar *ArchiveReader) Open() (Handle, error)
Open returns a handle to the entry.
func (*ArchiveReader) Owner ¶
func (ar *ArchiveReader) Owner() (uid, gid int)
Owner returns the uid and gid of the entry.
func (*ArchiveReader) Size ¶
func (ar *ArchiveReader) Size() int64
Size returns the size of the entry in bytes.
type ArchiveWriter ¶
type ArchiveWriter struct {
// contains filtered or unexported fields
}
func NewArchiveWriter ¶
func NewArchiveWriter(index, contents io.Writer) (*ArchiveWriter, error)
func (*ArchiveWriter) DisablePadding ¶
func (w *ArchiveWriter) DisablePadding()
func (*ArchiveWriter) WriteEntry ¶
func (w *ArchiveWriter) WriteEntry(entry *EntryFactory, r io.Reader) error
type Entry ¶
type EntryFactory ¶
type EntryFactory struct {
// contains filtered or unexported fields
}
func (*EntryFactory) Kind ¶
func (e *EntryFactory) Kind(k EntryKind) *EntryFactory
func (*EntryFactory) Linkname ¶
func (e *EntryFactory) Linkname(s string) *EntryFactory
func (*EntryFactory) ModTime ¶
func (e *EntryFactory) ModTime(t time.Time) *EntryFactory
func (*EntryFactory) Mode ¶
func (e *EntryFactory) Mode(s fs.FileMode) *EntryFactory
func (*EntryFactory) Name ¶
func (e *EntryFactory) Name(s string) *EntryFactory
func (*EntryFactory) Owner ¶
func (e *EntryFactory) Owner(uid, gid int) *EntryFactory
func (*EntryFactory) Size ¶
func (e *EntryFactory) Size(s int64) *EntryFactory
type EntryKind ¶
type EntryKind uint8
const ( EntryKindInvalid EntryKind = iota EntryKindRegular // Regular file with contents EntryKindDirectory // Directory EntryKindSymlink // Symbolic link to another file EntryKindHardlink // Hard link to another file EntryKindExtended // Extended file with metadata EntryKindDeleted // Deleted file )
Click to show internal directories.
Click to hide internal directories.