sorter

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByExtensionAscend

func ByExtensionAscend(a, b os.FileInfo) bool

func ByExtensionCaseSensitiveAscend

func ByExtensionCaseSensitiveAscend(a, b os.FileInfo) bool

func ByExtensionCaseSensitiveDescend

func ByExtensionCaseSensitiveDescend(a, b os.FileInfo) bool

func ByExtensionDescend

func ByExtensionDescend(a, b os.FileInfo) bool

func ByGroupAscend

func ByGroupAscend(a, b os.FileInfo) bool

func ByGroupCaseSensitiveAscend

func ByGroupCaseSensitiveAscend(a, b os.FileInfo) bool

func ByGroupCaseSensitiveDescend

func ByGroupCaseSensitiveDescend(a, b os.FileInfo) bool

func ByGroupDescend

func ByGroupDescend(a, b os.FileInfo) bool

func ByMimeTypeAscend added in v0.7.0

func ByMimeTypeAscend(a, b os.FileInfo) bool

func ByMimeTypeDescend added in v0.7.0

func ByMimeTypeDescend(a, b os.FileInfo) bool

func ByMimeTypeParentAscend added in v0.7.0

func ByMimeTypeParentAscend(a, b os.FileInfo) bool

func ByMimeTypeParentDescend added in v0.7.0

func ByMimeTypeParentDescend(a, b os.FileInfo) bool

func ByNameAscend

func ByNameAscend(a, b os.FileInfo) bool

func ByNameCaseSensitiveAscend

func ByNameCaseSensitiveAscend(a, b os.FileInfo) bool

func ByNameCaseSensitiveDescend

func ByNameCaseSensitiveDescend(a, b os.FileInfo) bool

func ByNameDescend

func ByNameDescend(a, b os.FileInfo) bool

func ByNameWidthAscend added in v0.7.0

func ByNameWidthAscend(a, b os.FileInfo) bool

func ByNameWidthDescend added in v0.7.0

func ByNameWidthDescend(a, b os.FileInfo) bool

func ByNone added in v0.6.0

func ByNone(a, b os.FileInfo) bool

func ByOwnerAscend

func ByOwnerAscend(a, b os.FileInfo) bool

func ByOwnerCaseSensitiveAscend

func ByOwnerCaseSensitiveAscend(a, b os.FileInfo) bool

func ByOwnerCaseSensitiveDescend

func ByOwnerCaseSensitiveDescend(a, b os.FileInfo) bool

func ByOwnerDescend

func ByOwnerDescend(a, b os.FileInfo) bool

func BySizeAscend

func BySizeAscend(a, b os.FileInfo) bool

func BySizeDescend

func BySizeDescend(a, b os.FileInfo) bool

func Default

func Default(a, b os.FileInfo) bool

Types

type FileSortFunc

type FileSortFunc = func(a, b os.FileInfo) bool

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