Documentation
¶
Overview ¶
* @Author: soso * @Date: 2022-01-29 10:25:06 * @LastEditTime: 2022-01-29 18:41:42 * @LastEditors: Please set LastEditors * @Description: 目录的树形结构存储 * @FilePath: /go-mesh-sync/sdirs/node.go
Index ¶
- func HashFileMd5(filename string) (md5str string, err error)
- type DNode
- func (n *DNode) GetParent() *DNode
- func (n *DNode) GetPath() string
- func (n *DNode) GetPathRelWithRoot() string
- func (n *DNode) IsEmpty() bool
- func (n *DNode) List()
- func (n *DNode) ListCallBack(cb func(node *DNode))
- func (n *DNode) ListPath()
- func (n *DNode) Load()
- func (n *DNode) LoadDirStruct()
- func (n *DNode) Save()
- func (n *DNode) Serialize() []byte
- func (n *DNode) Unserialize(buf []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DNode ¶
type DNode struct {
Name string `yaml:"name"`
Size int64 `yaml:"size"`
Mode fs.FileMode `yaml:"mode"`
ModTime time.Time `yaml:"modTime"`
IsDir bool `yaml:"isDir"`
Level uint8 `yaml:"level"`
Md5 string `yaml:"md5"`
Children map[string]*DNode `yaml:"children"`
// contains filtered or unexported fields
}
func NewRootNode ¶
Click to show internal directories.
Click to hide internal directories.