Documentation
¶
Index ¶
- Constants
- func ByteString(b int64) (res string)
- func NewTreeMapHttp(addr, tmpPath string)
- func PathDepth(path string) int
- func StringToByte(s string) (res int, err error)
- type CountFile
- type DelFail
- type Dir
- func (d *Dir) GetFullPath() string
- func (d *Dir) GetName() string
- func (d *Dir) GetSize() int64
- func (d *Dir) IsDir() bool
- func (d *Dir) Print(i int)
- func (d *Dir) String() string
- func (d *Dir) Walk(countFile *CountFile, ignoreRules RuleList, topK *TopK, ...) error
- func (d *Dir) WalkSync(depth uint8, syncMaxDepth uint8, countFile *CountFile, ignoreRules RuleList, ...) error
- type DirectoryRule
- type DuplicateFiles
- type File
- type FileCluster
- type FileHead
- type FileInfo
- type FileNameRule
- type FilePathRule
- type FileSizeRule
- type Link
- type Node
- type Rule
- type RuleList
- type ShardedMap
- type SuffixRule
- type TopK
Constants ¶
View Source
const ( TypeDir = iota TypeFile TypeLink )
View Source
const ( Byte = 1 KiloByte = Byte << 10 MegaByte = KiloByte << 10 GigaByte = MegaByte << 10 TeraByte = GigaByte << 10 )
View Source
const VERSION = "0.1.3"
Variables ¶
This section is empty.
Functions ¶
func ByteString ¶
func NewTreeMapHttp ¶ added in v0.1.3
func NewTreeMapHttp(addr, tmpPath string)
func StringToByte ¶ added in v0.1.2
Types ¶
type CountFile ¶ added in v0.1.1
type CountFile struct {
// contains filtered or unexported fields
}
func NewCountFile ¶ added in v0.1.1
type Dir ¶
type Dir struct {
sync.Mutex `json:"-" yaml:"-"`
Name string `json:"name" yaml:"name"`
FullPath string `json:"path" yaml:"full_path"`
Size int64 `json:"value" yaml:"size"`
Type uint16 `json:"type" yaml:"type"`
Perm uint16 `json:"perm" yaml:"perm"`
Children []any `json:"children" yaml:"children"`
}
Dir Directory
func (*Dir) GetFullPath ¶ added in v0.1.2
type DirectoryRule ¶ added in v0.1.2
type DirectoryRule struct {
// contains filtered or unexported fields
}
func (DirectoryRule) Ignore ¶ added in v0.1.2
func (d DirectoryRule) Ignore(node Node) bool
type DuplicateFiles ¶ added in v0.1.4
type DuplicateFiles struct {
// contains filtered or unexported fields
}
func NewDuplicateFiles ¶ added in v0.1.4
func NewDuplicateFiles() *DuplicateFiles
func (*DuplicateFiles) Check ¶ added in v0.1.4
func (d *DuplicateFiles) Check() (ret []FileCluster)
func (*DuplicateFiles) Push ¶ added in v0.1.4
func (d *DuplicateFiles) Push(f File)
type File ¶
type File struct {
Name string `json:"name" yaml:"name"`
FullPath string `json:"path" yaml:"full_path"`
Size int64 `json:"value" yaml:"size"`
Type uint8 `json:"type" yaml:"type"`
Perm uint16 `json:"perm" yaml:"perm"`
Suffix string `json:"suffix" yaml:"suffix"`
}
func (*File) GetFullPath ¶
type FileCluster ¶ added in v0.1.4
type FileNameRule ¶ added in v0.1.2
type FileNameRule struct {
// contains filtered or unexported fields
}
func (FileNameRule) Ignore ¶ added in v0.1.2
func (f FileNameRule) Ignore(node Node) bool
type FilePathRule ¶ added in v0.1.2
type FilePathRule struct {
// contains filtered or unexported fields
}
func (FilePathRule) Ignore ¶ added in v0.1.2
func (f FilePathRule) Ignore(node Node) bool
type FileSizeRule ¶ added in v0.1.2
type FileSizeRule struct {
// contains filtered or unexported fields
}
func (FileSizeRule) Ignore ¶ added in v0.1.2
func (f FileSizeRule) Ignore(node Node) bool
type Link ¶
type Link struct {
Name string `json:"name" yaml:"name"`
FullPath string `json:"path" yaml:"full_path"`
Size int64 `json:"value" yaml:"size"`
Type uint8 `json:"type" yaml:"type"`
Perm uint16 `json:"perm" yaml:"perm"`
LinkTo string `json:"link_to" yaml:"link_to"`
}
func (Link) GetFullPath ¶ added in v0.1.2
type ShardedMap ¶ added in v0.1.1
func NewShardedMap ¶ added in v0.1.1
func NewShardedMap() *ShardedMap
type SuffixRule ¶ added in v0.1.2
type SuffixRule struct {
// contains filtered or unexported fields
}
func (SuffixRule) Ignore ¶ added in v0.1.2
func (s SuffixRule) Ignore(node Node) bool
type TopK ¶ added in v0.1.4
type TopK struct {
// contains filtered or unexported fields
}
func (*TopK) TopKSorted ¶ added in v0.1.4
Click to show internal directories.
Click to hide internal directories.