Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // "const" string slice to enforce the field order for pretty printing FTypeNames = func() []string { return []string{"dir", "audio", "application", "image", "other", "total"} } FClassNames = func() []string { return []string{"dir", "other", "application", "archive", "audio", "document", "image", "video"} } )
Functions ¶
func FileTypeStatsToString ¶
func FileTypeStatsToString(self *FileTypeStats)
Types ¶
type FTypeStat ¶
FTypeStat contains:
either a summary for one filetype (Path is wildcard and FileCount >= 1) or the type and size of one file (Path is regular file and FileCount == 1)
type FTypeStatsBatch ¶ added in v0.8.0
type FTypeStatsBatch struct {
// contains filtered or unexported fields
}
FTypeStatsBatch is a "stack like" buffer with a pointer to the next free slot
func NewFTypeStatsBatch ¶ added in v0.8.0
func NewFTypeStatsBatch(capacity int) *FTypeStatsBatch
func (*FTypeStatsBatch) AllElem ¶ added in v0.8.0
func (fb *FTypeStatsBatch) AllElem() []FTypeStat
func (*FTypeStatsBatch) IsEmpty ¶ added in v0.8.0
func (fb *FTypeStatsBatch) IsEmpty() bool
func (*FTypeStatsBatch) IsFull ¶ added in v0.8.0
func (fb *FTypeStatsBatch) IsFull() bool
func (*FTypeStatsBatch) Push ¶ added in v0.8.0
func (fb *FTypeStatsBatch) Push(elem FTypeStat) bool
Push pushes an item in the buffer and returns false if the buffer is full (For convenience false will still handle the current pushif possible, it's just the last one possible, so flushing should be handled by the user)
func (*FTypeStatsBatch) Reset ¶ added in v0.8.0
func (fb *FTypeStatsBatch) Reset()
type FileTypeStats ¶
FileTypeStats is a map from type (same as FTypeStat.FType) to FTypeStat
func (*FileTypeStats) ToString ¶
func (f *FileTypeStats) ToString() string
Click to show internal directories.
Click to hide internal directories.