sorter

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MimeTypeName = filter.MimeTypeName
View Source
const RecursiveSizeName = content.RecursiveSizeName

Variables

This section is empty.

Functions

func ByExtensionAscend

func ByExtensionAscend(a, b *item.FileInfo) int

func ByExtensionCaseSensitiveAscend

func ByExtensionCaseSensitiveAscend(a, b *item.FileInfo) int

func ByExtensionCaseSensitiveDescend

func ByExtensionCaseSensitiveDescend(a, b *item.FileInfo) int

func ByExtensionDescend

func ByExtensionDescend(a, b *item.FileInfo) int

func ByGroupAscend

func ByGroupAscend(a, b *item.FileInfo) int

func ByGroupCaseSensitiveAscend

func ByGroupCaseSensitiveAscend(a, b *item.FileInfo) int

func ByGroupCaseSensitiveDescend

func ByGroupCaseSensitiveDescend(a, b *item.FileInfo) int

func ByGroupDescend

func ByGroupDescend(a, b *item.FileInfo) int

func ByInodeAscend added in v0.8.0

func ByInodeAscend(a, b *item.FileInfo) int

func ByInodeDescend added in v0.8.0

func ByInodeDescend(a, b *item.FileInfo) int

func ByMimeTypeAscend added in v0.7.0

func ByMimeTypeAscend(a, b *item.FileInfo) int

func ByMimeTypeDescend added in v0.7.0

func ByMimeTypeDescend(a, b *item.FileInfo) int

func ByMimeTypeParentAscend added in v0.7.0

func ByMimeTypeParentAscend(a, b *item.FileInfo) int

func ByMimeTypeParentDescend added in v0.7.0

func ByMimeTypeParentDescend(a, b *item.FileInfo) int

func ByNameAscend

func ByNameAscend(a, b *item.FileInfo) int

func ByNameCaseSensitiveAscend

func ByNameCaseSensitiveAscend(a, b *item.FileInfo) int

func ByNameCaseSensitiveDescend

func ByNameCaseSensitiveDescend(a, b *item.FileInfo) int

func ByNameDescend

func ByNameDescend(a, b *item.FileInfo) int

func ByNameWidthAscend added in v0.7.0

func ByNameWidthAscend(a, b *item.FileInfo) int

func ByNameWidthDescend added in v0.7.0

func ByNameWidthDescend(a, b *item.FileInfo) int

func ByNameWithoutALeadingDotAscend added in v0.8.0

func ByNameWithoutALeadingDotAscend(a, b *item.FileInfo) int

func ByNameWithoutALeadingDotCaseSensitiveAscend added in v0.8.0

func ByNameWithoutALeadingDotCaseSensitiveAscend(a, b *item.FileInfo) int

func ByNameWithoutALeadingDotCaseSensitiveDescend added in v0.8.0

func ByNameWithoutALeadingDotCaseSensitiveDescend(a, b *item.FileInfo) int

func ByNameWithoutALeadingDotDescend added in v0.8.0

func ByNameWithoutALeadingDotDescend(a, b *item.FileInfo) int

func ByNone added in v0.6.0

func ByNone(a, b *item.FileInfo) int

ByNone Deprecated

func ByOwnerAscend

func ByOwnerAscend(a, b *item.FileInfo) int

func ByOwnerCaseSensitiveAscend

func ByOwnerCaseSensitiveAscend(a, b *item.FileInfo) int

func ByOwnerCaseSensitiveDescend

func ByOwnerCaseSensitiveDescend(a, b *item.FileInfo) int

func ByOwnerDescend

func ByOwnerDescend(a, b *item.FileInfo) int

func BySizeAscend

func BySizeAscend(a, b *item.FileInfo) int

func BySizeDescend

func BySizeDescend(a, b *item.FileInfo) int

func ByVersionAscend added in v0.14.0

func ByVersionAscend(a, b *item.FileInfo) int

func ByVersionDescend added in v0.14.0

func ByVersionDescend(a, b *item.FileInfo) int

func Default

func Default(a, b *item.FileInfo) int

Types

type FileSortFunc

type FileSortFunc = func(a, b *item.FileInfo) int

func ByRecursiveSizeAscend added in v0.8.5

func ByRecursiveSizeAscend(depth int) FileSortFunc

func ByRecursiveSizeDescend added in v0.8.5

func ByRecursiveSizeDescend(depth int) FileSortFunc

func ByTimeAscend

func ByTimeAscend(timeType string) FileSortFunc

func ByTimeDescend

func ByTimeDescend(timeType string) FileSortFunc

type Option

type Option = func(s *Sorter)

func WithSize

func WithSize(size int) Option

func WithSortOption

func WithSortOption(option ...FileSortFunc) Option

type Sorter

type Sorter struct {
	// contains filtered or unexported fields
}

func NewSorter

func NewSorter(option ...Option) *Sorter

func (*Sorter) AddOption

func (s *Sorter) AddOption(option ...FileSortFunc)

func (*Sorter) Build

func (s *Sorter) Build() FileSortFunc

func (*Sorter) DirFirst

func (s *Sorter) DirFirst()

func (*Sorter) Len

func (s *Sorter) Len() int

func (*Sorter) Reset added in v0.7.0

func (s *Sorter) Reset()

func (*Sorter) Reverse

func (s *Sorter) Reverse()

func (*Sorter) UnsetDirFirst

func (s *Sorter) UnsetDirFirst()

Jump to

Keyboard shortcuts

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