Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type AttMap ¶
type AttMap interface {
GetKind() string
}
AttMap defines an interface to general attributes for file nodes.
type BaseAtts ¶
BaseAtts are attributes associated with all most types.
type Comparer ¶
type Comparer struct {
// contains filtered or unexported fields
}
The Comparer is a writer where the diffs between two trees will be written.
type DevAtts ¶
DevAtts is for block and character nodes.
type FifoAtts ¶
FifoAtts is for both fifos and sockets.
type File ¶
A non-directory node (not necessarily a plain file)
type LinkAtts ¶
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
A progress meter. Records files visited, and number of bytes processed. When given an estimate, prints a simple periodic report of how far along we think we are.
type PushDecoder ¶
type PushDecoder struct {
// contains filtered or unexported fields
}
A PushDecoder is a stateful decoder that can be given a surefile one line at a time, and generate the full tree.
func NewPushDecoder ¶
func NewPushDecoder() *PushDecoder
func (*PushDecoder) Add ¶
func (pd *PushDecoder) Add(line string) error
Add adds a line to the push decoder.
func (*PushDecoder) Tree ¶
func (pd *PushDecoder) Tree() (*Tree, error)
Tree extracts the tree from the push decoder. Returns an error if a full surefile wasn't pushed to it.
type RegAtts ¶
type Tree ¶
A directory tree node.
func GenerateTree ¶
Generate a random tree for testing.
func ScanFs ¶
Walk a directory tree, generating a tree structure for it. All attributes are filled in that can be gleaned through lstat (and possibly readlink). The files themselves are not opened.
func (*Tree) ComputeHashes ¶
Update all of the file nodes that don't have hashes.
func (*Tree) Encode ¶
Encode the sure tree to the given writer.