sort

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package sort is used to sort file changes in a variety of ways Alphabetical order is the default

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alphabetically

func Alphabetically(changes []*file.Change, reverseSort bool) []*file.Change

Alphabetically sorts the changes in alphabetical order.

func BySize

func BySize(changes []*file.Change, reverseSort bool) ([]*file.Change, error)

BySize sorts the changes according to their file size.

func ByTime

func ByTime(
	changes []*file.Change,
	sortName string,
	reverseSort bool,
) ([]*file.Change, error)

ByTime sorts the changes by the specified file timing attribute (modified time, access time, change time, or birth time).

func Changes

func Changes(
	changes []*file.Change,
	sortName string,
	reverseSort bool,
) ([]*file.Change, error)

Changes is used to sort changes according to the configured sort value.

func FilesBeforeDirs

func FilesBeforeDirs(changes []*file.Change, revert bool) []*file.Change

FilesBeforeDirs is used to sort files before directories to avoid renaming conflicts. It also ensures that child directories are renamed before their parents and vice versa in undo mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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