Documentation ¶
Index ¶
- Constants
- Variables
- func Convert2SizeString(size SizeUnit) string
- func CountBytes(size SizeUnit) uint64
- func DetectorFallthrough(d *DuplicateDetect)
- func MountsOn(path string) string
- type BlockSizeEnabler
- type CharsetEnabler
- type ContentFilter
- func (cf *ContentFilter) AppendToNoOutputOptions(options ...NoOutputOption)
- func (cf *ContentFilter) AppendToOptions(options ...ContentOption)
- func (cf *ContentFilter) GetDisplayItems(e *[]*item.FileInfo)
- func (cf *ContentFilter) SetNoOutputOptions(outputFunc ...NoOutputOption)
- func (cf *ContentFilter) SetOptions(options ...ContentOption)
- func (cf *ContentFilter) SetSortFunc(sortFunc func(a, b *item.FileInfo) int)
- func (cf *ContentFilter) SortFunc() func(a, b *item.FileInfo) int
- type ContentFilterOption
- type ContentOption
- type DOption
- type Duplicate
- type DuplicateDetect
- type FlagsEnabler
- type GitEnabler
- type GitRepoEnabler
- type GroupEnabler
- type IndexEnabler
- type InodeEnabler
- type LinkEnabler
- type MimeFileTypeEnabler
- type Name
- func (n *Name) Enable(renderer *render.Renderer) ContentOption
- func (n *Name) FullPath() bool
- func (n *Name) RelativeTo() string
- func (n *Name) SetClassify() *Name
- func (n *Name) SetFileType() *Name
- func (n *Name) SetFullPath() *Name
- func (n *Name) SetHyperlink() *Name
- func (n *Name) SetIcon() *Name
- func (n *Name) SetJson() *Name
- func (n *Name) SetMounts() *Name
- func (n *Name) SetNoDeference() *Name
- func (n *Name) SetQuote() *Name
- func (n *Name) SetQuoteString(quote string) *Name
- func (n *Name) SetRelativeTo(relativeTo string)
- func (n *Name) SetStatistics(Statistics *Statistics) *Name
- func (n *Name) Statistics() *Statistics
- func (n *Name) UnsetClassify() *Name
- func (n *Name) UnsetFileType() *Name
- func (n *Name) UnsetFullPath() *Name
- func (n *Name) UnsetHyperlink() *Name
- func (n *Name) UnsetIcon() *Name
- func (n *Name) UnsetJson() *Name
- func (n *Name) UnsetMounts() *Name
- func (n *Name) UnsetNoDeference() *Name
- func (n *Name) UnsetQuote() *Name
- type NoOutputOption
- type OwnerEnabler
- type RelativeTimeEnabler
- type Size
- type SizeEnabler
- func (s *SizeEnabler) DisableTotal()
- func (s *SizeEnabler) EnableSize(size SizeUnit, renderer *render.Renderer) ContentOption
- func (s *SizeEnabler) Recursive() *SizeRecursive
- func (s *SizeEnabler) Reset()
- func (s *SizeEnabler) SetEnableTotal()
- func (s *SizeEnabler) SetRecursive(sr *SizeRecursive)
- func (s *SizeEnabler) SetSI() *SizeEnabler
- func (s *SizeEnabler) Size2String(b int64) (string, SizeUnit)
- func (s *SizeEnabler) SizeUint() SizeUnit
- func (s *SizeEnabler) Total() (size int64, ok bool)
- type SizeRecursive
- type SizeUnit
- type Statistics
- type SumEnabler
- type SumType
Constants ¶
View Source
const ( GitRepoBranch = constval.NameOfGitRepoBranch GitRepoStatus = constval.NameOfGitRepoStatus )
View Source
const ( GroupName = constval.NameOfGroupName GroupUidName = constval.NameOfGroupUidName GroupSID = constval.NameOfGroupSID )
View Source
const ( MimeTypeName = constval.NameOfMIME ParentMimeTypeName = "Parent-Mime-type" )
View Source
const ( OwnerName = constval.NameOfOwner OwnerUidName = constval.NameOfOwnerUid OwnerSID = constval.NameOfOwnerSID )
View Source
const ( KB = 1000 * Byte MB = 1000 * KB GB = 1000 * MB TB = 1000 * GB )
SI units
View Source
const BlockSizeName = "Blocks"
View Source
const (
Charset = constval.NameOfCharset
)
View Source
const (
Flags = constval.NameOfFlags
)
View Source
const GitStatus = constval.NameOfGitStatus
View Source
const Inode = constval.NameOfInode
View Source
const Link = constval.NameOfLink
View Source
const NameName = global.NameOfName
View Source
const OctalPermissions = "Octal"
View Source
const Permissions = constval.NameOfPermission
View Source
const RecursiveSizeName = "recursive_size"
View Source
const RelativeTime = constval.NameOfRelativeTime
View Source
const SizeName = constval.NameOfSize
Variables ¶
View Source
var Pool *ants.Pool
Functions ¶
func Convert2SizeString ¶
func CountBytes ¶
func DetectorFallthrough ¶
func DetectorFallthrough(d *DuplicateDetect)
Types ¶
type BlockSizeEnabler ¶
type BlockSizeEnabler struct{}
func NewBlockSizeEnabler ¶
func NewBlockSizeEnabler() *BlockSizeEnabler
func (*BlockSizeEnabler) Enable ¶
func (b *BlockSizeEnabler) Enable(renderer *render.Renderer) ContentOption
type CharsetEnabler ¶
type CharsetEnabler struct{}
func NewCharsetEnabler ¶
func NewCharsetEnabler() *CharsetEnabler
func (*CharsetEnabler) Enable ¶
func (c *CharsetEnabler) Enable(renderer *render.Renderer) ContentOption
type ContentFilter ¶
type ContentFilter struct { LimitN uint // <=0 means no limit // contains filtered or unexported fields }
func NewContentFilter ¶
func NewContentFilter(options ...ContentFilterOption) *ContentFilter
func (*ContentFilter) AppendToNoOutputOptions ¶
func (cf *ContentFilter) AppendToNoOutputOptions(options ...NoOutputOption)
func (*ContentFilter) AppendToOptions ¶
func (cf *ContentFilter) AppendToOptions(options ...ContentOption)
func (*ContentFilter) GetDisplayItems ¶
func (cf *ContentFilter) GetDisplayItems(e *[]*item.FileInfo)
func (*ContentFilter) SetNoOutputOptions ¶
func (cf *ContentFilter) SetNoOutputOptions(outputFunc ...NoOutputOption)
func (*ContentFilter) SetOptions ¶
func (cf *ContentFilter) SetOptions(options ...ContentOption)
func (*ContentFilter) SetSortFunc ¶
func (cf *ContentFilter) SetSortFunc(sortFunc func(a, b *item.FileInfo) int)
type ContentFilterOption ¶
type ContentFilterOption func(cf *ContentFilter)
func WithNoOutputOptions ¶
func WithNoOutputOptions(options ...NoOutputOption) ContentFilterOption
func WithOptions ¶
func WithOptions(options ...ContentOption) ContentFilterOption
type ContentOption ¶
func EnableFileMode ¶
func EnableFileMode(renderer *render.Renderer) ContentOption
EnableFileMode return file mode like -rwxrwxrwx/drwxrwxrwx
func EnableFileOctalPermissions ¶
func EnableFileOctalPermissions(renderer *render.Renderer) ContentOption
func EnableTime ¶
func EnableTime(format string, mode string, renderer *render.Renderer) ContentOption
EnableTime enables time accepts ['mod', 'modified', 'create', 'access', 'birth']
type DuplicateDetect ¶
type DuplicateDetect struct { IsThrough bool // contains filtered or unexported fields }
func NewDuplicateDetect ¶
func NewDuplicateDetect(options ...DOption) *DuplicateDetect
func (*DuplicateDetect) Enable ¶
func (d *DuplicateDetect) Enable() NoOutputOption
func (*DuplicateDetect) Fprint ¶
func (d *DuplicateDetect) Fprint(w io.Writer)
func (*DuplicateDetect) Reset ¶
func (d *DuplicateDetect) Reset()
func (*DuplicateDetect) Result ¶
func (d *DuplicateDetect) Result() []Duplicate
type FlagsEnabler ¶ added in v0.29.0
type FlagsEnabler struct{}
func NewFlagsEnabler ¶ added in v0.29.0
func NewFlagsEnabler() *FlagsEnabler
func (FlagsEnabler) Enable ¶ added in v0.29.0
func (f FlagsEnabler) Enable() ContentOption
type GitEnabler ¶
func NewGitEnabler ¶
func NewGitEnabler() *GitEnabler
func (*GitEnabler) Enable ¶
func (g *GitEnabler) Enable(renderer *render.Renderer) ContentOption
func (*GitEnabler) InitCache ¶
func (g *GitEnabler) InitCache(repo git.RepoPath)
type GitRepoEnabler ¶
type GitRepoEnabler struct{}
func NewGitRepoEnabler ¶
func NewGitRepoEnabler() *GitRepoEnabler
func (*GitRepoEnabler) Enable ¶
func (g *GitRepoEnabler) Enable(renderer *render.Renderer) ContentOption
func (*GitRepoEnabler) EnableStatus ¶
func (g *GitRepoEnabler) EnableStatus(renderer *render.Renderer) ContentOption
type GroupEnabler ¶
func NewGroupEnabler ¶
func NewGroupEnabler() *GroupEnabler
func (*GroupEnabler) DisableNumeric ¶
func (g *GroupEnabler) DisableNumeric()
func (*GroupEnabler) DisableSmartMode ¶
func (g *GroupEnabler) DisableSmartMode()
func (*GroupEnabler) EnableGroup ¶
func (g *GroupEnabler) EnableGroup(renderer *render.Renderer) ContentOption
func (*GroupEnabler) EnableNumeric ¶
func (g *GroupEnabler) EnableNumeric()
func (*GroupEnabler) EnableSmartMode ¶
func (g *GroupEnabler) EnableSmartMode()
type IndexEnabler ¶
type IndexEnabler struct{}
func NewIndexEnabler ¶
func NewIndexEnabler() *IndexEnabler
func (*IndexEnabler) Enable ¶
func (i *IndexEnabler) Enable() ContentOption
type InodeEnabler ¶
type InodeEnabler struct{}
func NewInodeEnabler ¶
func NewInodeEnabler() *InodeEnabler
func (*InodeEnabler) Enable ¶
func (i *InodeEnabler) Enable(renderer *render.Renderer) ContentOption
type LinkEnabler ¶
type LinkEnabler struct{}
LinkEnabler List each file's number of hard links.
func NewLinkEnabler ¶
func NewLinkEnabler() *LinkEnabler
func (*LinkEnabler) Enable ¶
func (l *LinkEnabler) Enable(renderer *render.Renderer) ContentOption
type MimeFileTypeEnabler ¶
type MimeFileTypeEnabler struct {
ParentOnly bool
}
func NewMimeFileTypeEnabler ¶
func NewMimeFileTypeEnabler() *MimeFileTypeEnabler
func (*MimeFileTypeEnabler) Enable ¶
func (e *MimeFileTypeEnabler) Enable(renderer *render.Renderer) ContentOption
type Name ¶
type Name struct { Quote string QuoteStatus int8 // >1 always quote || =0 default || <0 never quote // contains filtered or unexported fields }
func NewNameEnabler ¶ added in v0.29.0
func NewNameEnabler() *Name
func (*Name) Enable ¶
func (n *Name) Enable(renderer *render.Renderer) ContentOption
Enable color + icon + file://quote+filename/relative-name+quote + classify + color-end + dereference + mounts color: filetype->filename->fileext->file
func (*Name) RelativeTo ¶
func (*Name) SetClassify ¶
func (*Name) SetFileType ¶
SetFileType set file type should set classify first if classify is false, fileType will be ignored
func (*Name) SetFullPath ¶
func (*Name) SetHyperlink ¶
func (*Name) SetNoDeference ¶
func (*Name) SetQuoteString ¶
func (*Name) SetRelativeTo ¶
func (*Name) SetStatistics ¶
func (n *Name) SetStatistics(Statistics *Statistics) *Name
func (*Name) Statistics ¶
func (n *Name) Statistics() *Statistics
func (*Name) UnsetClassify ¶
func (*Name) UnsetFileType ¶
func (*Name) UnsetFullPath ¶
func (*Name) UnsetHyperlink ¶
func (*Name) UnsetMounts ¶
func (*Name) UnsetNoDeference ¶
func (*Name) UnsetQuote ¶
type NoOutputOption ¶
type OwnerEnabler ¶
type OwnerEnabler struct {
Numeric bool
}
func NewOwnerEnabler ¶
func NewOwnerEnabler() *OwnerEnabler
func (*OwnerEnabler) DisableNumeric ¶
func (o *OwnerEnabler) DisableNumeric()
func (*OwnerEnabler) EnableNumeric ¶
func (o *OwnerEnabler) EnableNumeric()
func (*OwnerEnabler) EnableOwner ¶
func (o *OwnerEnabler) EnableOwner(renderer *render.Renderer) ContentOption
type RelativeTimeEnabler ¶
type RelativeTimeEnabler struct {
Mode string
}
func NewRelativeTimeEnabler ¶
func NewRelativeTimeEnabler() *RelativeTimeEnabler
func (*RelativeTimeEnabler) Enable ¶
func (r *RelativeTimeEnabler) Enable(renderer *render.Renderer) ContentOption
type SizeEnabler ¶
type SizeEnabler struct {
// contains filtered or unexported fields
}
func NewSizeEnabler ¶
func NewSizeEnabler() *SizeEnabler
func (*SizeEnabler) DisableTotal ¶
func (s *SizeEnabler) DisableTotal()
func (*SizeEnabler) EnableSize ¶
func (s *SizeEnabler) EnableSize(size SizeUnit, renderer *render.Renderer) ContentOption
func (*SizeEnabler) Recursive ¶
func (s *SizeEnabler) Recursive() *SizeRecursive
func (*SizeEnabler) Reset ¶
func (s *SizeEnabler) Reset()
func (*SizeEnabler) SetEnableTotal ¶
func (s *SizeEnabler) SetEnableTotal()
func (*SizeEnabler) SetRecursive ¶
func (s *SizeEnabler) SetRecursive(sr *SizeRecursive)
func (*SizeEnabler) SetSI ¶
func (s *SizeEnabler) SetSI() *SizeEnabler
func (*SizeEnabler) Size2String ¶
func (s *SizeEnabler) Size2String(b int64) (string, SizeUnit)
func (*SizeEnabler) SizeUint ¶
func (s *SizeEnabler) SizeUint() SizeUnit
func (*SizeEnabler) Total ¶
func (s *SizeEnabler) Total() (size int64, ok bool)
type SizeRecursive ¶
type SizeRecursive struct {
// contains filtered or unexported fields
}
func NewSizeRecursive ¶
func NewSizeRecursive(depth int) *SizeRecursive
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func (*Statistics) MarshalJSON ¶
func (s *Statistics) MarshalJSON() ([]byte, error)
func (*Statistics) Reset ¶
func (s *Statistics) Reset()
func (*Statistics) String ¶
func (s *Statistics) String() string
type SumEnabler ¶
type SumEnabler struct{}
func (SumEnabler) EnableSum ¶
func (s SumEnabler) EnableSum(renderer *render.Renderer, sumTypes ...SumType) []ContentOption
Click to show internal directories.
Click to hide internal directories.