content

package
v0.25.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitRepoBranch = "Branch"
	GitRepoStatus = "Repo-status"
)
View Source
const (
	GroupName    = "Group"
	GroupUidName = "Group-uid"
	GroupSID     = "Group-sid"
)
View Source
const (
	MimeTypeName       = filter.MimeTypeName
	ParentMimeTypeName = "Parent-Mime-type"
)
View Source
const (
	OwnerName    = "Owner"
	OwnerUidName = "Owner-uid"
	OwnerSID     = "Owner-sid"
)
View Source
const BlockSizeName = "Blocks"
View Source
const (
	Charset = "Charset"
)
View Source
const GitStatus = "Git"
View Source
const Inode = "Inode"
View Source
const Link = "Link"
View Source
const NameName = "Name"
View Source
const OctalPermissions = "Octal"
View Source
const Permissions = "Permissions"
View Source
const RecursiveSizeName = "recursive_size"
View Source
const RelativeTime = "Relative-Time"
View Source
const SizeName = "Size"
View Source
const SumName = "Sum"

Variables

This section is empty.

Functions

func Convert2SizeString

func Convert2SizeString(size SizeUnit) string

func DetectorFallthrough

func DetectorFallthrough(d *DuplicateDetect)

func EnableFileMode

func EnableFileMode(renderer *render.Renderer) filter.ContentOption

EnableFileMode return file mode like -rwxrwxrwx/drwxrwxrwx

func EnableFileOctalPermissions

func EnableFileOctalPermissions(renderer *render.Renderer) filter.ContentOption

func EnableTime

func EnableTime(format string, mode string, renderer *render.Renderer) filter.ContentOption

EnableTime enables time accepts ['mod', 'modified', 'create', 'access', 'birth']

Types

type BlockSizeEnabler

type BlockSizeEnabler struct{}

func NewBlockSizeEnabler

func NewBlockSizeEnabler() *BlockSizeEnabler

func (*BlockSizeEnabler) Enable

func (b *BlockSizeEnabler) Enable(renderer *render.Renderer) filter.ContentOption

type CharsetEnabler

type CharsetEnabler struct{}

func NewCharsetEnabler

func NewCharsetEnabler() *CharsetEnabler

func (*CharsetEnabler) Enable

func (c *CharsetEnabler) Enable(renderer *render.Renderer) filter.ContentOption

type DOption

type DOption func(d *DuplicateDetect)

func DuplicateWithTbSize

func DuplicateWithTbSize(size int) DOption

type Duplicate

type Duplicate struct {
	Filenames []string
}

type DuplicateDetect

type DuplicateDetect struct {
	IsThrough bool
	// contains filtered or unexported fields
}

func NewDuplicateDetect

func NewDuplicateDetect(options ...DOption) *DuplicateDetect

func (*DuplicateDetect) Enable

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 GitEnabler

type GitEnabler struct {
	Path git.RepoPath
	// contains filtered or unexported fields
}

func NewGitEnabler

func NewGitEnabler() *GitEnabler

func (*GitEnabler) Enable

func (g *GitEnabler) Enable(renderer *render.Renderer) filter.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) filter.ContentOption

func (*GitRepoEnabler) EnableStatus

func (g *GitRepoEnabler) EnableStatus(renderer *render.Renderer) filter.ContentOption

type GroupEnabler

type GroupEnabler struct {
	Numeric bool
	Smart   bool
}

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) filter.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() filter.ContentOption

type InodeEnabler

type InodeEnabler struct{}

func NewInodeEnabler

func NewInodeEnabler() *InodeEnabler

func (*InodeEnabler) Enable

func (i *InodeEnabler) Enable(renderer *render.Renderer) filter.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) filter.ContentOption

type MimeFileTypeEnabler

type MimeFileTypeEnabler struct {
	ParentOnly bool
}

func NewMimeFileTypeEnabler

func NewMimeFileTypeEnabler() *MimeFileTypeEnabler

func (*MimeFileTypeEnabler) Enable

type Name

type Name struct {
	Quote       string
	QuoteStatus int8 // >1 always quote || =0 default || <0 never quote
	// contains filtered or unexported fields
}

func NewNameEnable

func NewNameEnable() *Name

func (*Name) Enable

func (n *Name) Enable(renderer *render.Renderer) filter.ContentOption

Enable color + icon + file://quote+filename/relative-name+quote + classify + color-end + dereference + mounts color: filetype->filename->fileext->file

func (*Name) FullPath

func (n *Name) FullPath() bool

func (*Name) RelativeTo

func (n *Name) RelativeTo() string

func (*Name) SetClassify

func (n *Name) SetClassify() *Name

func (*Name) SetFileType

func (n *Name) SetFileType() *Name

SetFileType set file type should set classify first if classify is false, fileType will be ignored

func (*Name) SetFullPath

func (n *Name) SetFullPath() *Name
func (n *Name) SetHyperlink() *Name

func (*Name) SetIcon

func (n *Name) SetIcon() *Name

func (*Name) SetMounts

func (n *Name) SetMounts() *Name

func (*Name) SetNoDeference

func (n *Name) SetNoDeference() *Name

func (*Name) SetQuote

func (n *Name) SetQuote() *Name

func (*Name) SetQuoteString

func (n *Name) SetQuoteString(quote string) *Name

func (*Name) SetRelativeTo

func (n *Name) SetRelativeTo(relativeTo string)

func (*Name) SetStatistics

func (n *Name) SetStatistics(Statistics *Statistics) *Name

func (*Name) Statistics

func (n *Name) Statistics() *Statistics

func (*Name) UnsetClassify

func (n *Name) UnsetClassify() *Name

func (*Name) UnsetFileType

func (n *Name) UnsetFileType() *Name

func (*Name) UnsetFullPath

func (n *Name) UnsetFullPath() *Name
func (n *Name) UnsetHyperlink() *Name

func (*Name) UnsetIcon

func (n *Name) UnsetIcon() *Name

func (*Name) UnsetMounts

func (n *Name) UnsetMounts() *Name

func (*Name) UnsetNoDeference

func (n *Name) UnsetNoDeference() *Name

func (*Name) UnsetQuote

func (n *Name) UnsetQuote() *Name

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) filter.ContentOption

type RelativeTimeEnabler

type RelativeTimeEnabler struct {
	Mode string
}

func NewRelativeTimeEnabler

func NewRelativeTimeEnabler() *RelativeTimeEnabler

func (*RelativeTimeEnabler) Enable

type Size

type Size struct {
	Bytes uint64
}

func ParseSize

func ParseSize(size string) (Size, error)

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) filter.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) 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 SizeUnit

type SizeUnit float64
const (
	Auto SizeUnit = iota
	Bit  SizeUnit = 1.0 << (10 * iota)
	B
	KB
	MB
	GB
	TB
	PB
	EB
	ZB
	YB
	BB
	NB
)
const Unknown SizeUnit = -1

func ConvertFromSizeString

func ConvertFromSizeString(size string) SizeUnit

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) filter.ContentOption

todo simd

type SumType

type SumType int
const (
	SumTypeMd5 SumType = iota + 1
	SumTypeSha1
	SumTypeSha224
	SumTypeSha256
	SumTypeSha384
	SumTypeSha512
	SumTypeCRC32
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL