1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-10-04 12:31:00 +00:00

walk: create and insert metadata signature comments

create Entry's for metadata signature that
describes time, machine, date, and user and append these
Entry's to creator.dh.Entries before starting the actual
walk.

Signed-off-by: Stephen Chung <schung@redhat.com>
This commit is contained in:
Stephen Chung 2016-07-11 11:41:42 -04:00
parent 0b85ce1f81
commit 4b3a9bfd02
4 changed files with 71 additions and 3 deletions

4
tar.go
View file

@ -10,11 +10,15 @@ import (
"strings"
)
// Streamer interface that wraps an io.ReadCloser with a function that will
// return it's Hierarchy
type Streamer interface {
io.ReadCloser
Hierarchy() (*DirectoryHierarchy, error)
}
// NewTarStreamer streams a tar archive and creates a file hierarchy based off
// of the tar metadata headers
func NewTarStreamer(r io.Reader, keywords []string) Streamer {
pR, pW := io.Pipe()
ts := &tarStream{