Versions in this module Expand all Collapse all v0 v0.6.1 Oct 14, 2024 v0.6.0 Sep 13, 2024 Changes in this version + var CodecMagicBytes = crypto.Keccak256([]byte("0g-storage-client-dir-codec")) + var CodecVersion = uint16(1) + func PrettyPrint(root *DiffNode) + type DiffNode struct + Entries *btree.BTreeG[*DiffNode] + Node *FsNode + Status DiffStatus + func Diff(current, next *FsNode) (*DiffNode, error) + func NewDiffNode(node *FsNode, status DiffStatus) *DiffNode + type DiffStatus string + const DiffStatusAdded + const DiffStatusModified + const DiffStatusRemoved + const DiffStatusUnchanged + type FileType string + const FileTypeDirectory + const FileTypeFile + const FileTypeSymbolic + type FsNode struct + Entries []*FsNode + Link string + Name string + Root string + Size int64 + Type FileType + func BuildFileTree(path string) (*FsNode, error) + func NewDirFsNode(name string, entryNodes []*FsNode) *FsNode + func NewFileFsNode(name string, rootHash common.Hash, size int64) *FsNode + func NewSymbolicFsNode(name, link string) *FsNode + func (node *FsNode) Equal(rhs *FsNode) bool + func (node *FsNode) Flatten(filterFunc ...func(*FsNode) bool) (result []*FsNode, relpaths []string) + func (node *FsNode) Locate(path string) (*FsNode, error) + func (node *FsNode) MarshalBinary() ([]byte, error) + func (node *FsNode) Search(fileName string) (*FsNode, bool) + func (node *FsNode) Traverse(actionFunc func(node *FsNode, relativePath string) error) error + func (node *FsNode) UnmarshalBinary(data []byte) error