Documentation
¶
Overview ¶
Package sort is used to sort file changes in a variety of ways Alphabetical order is the default
Index ¶
- func ByIntVar(changes file.Changes, conf *config.Config)
- func BySize(changes file.Changes, conf *config.Config)
- func ByStringVar(changes file.Changes, conf *config.Config)
- func ByTime(changes file.Changes, conf *config.Config)
- func ByTimeVar(changes file.Changes, conf *config.Config)
- func Changes(changes file.Changes, conf *config.Config)
- func ForRenamingAndUndo(changes file.Changes, revert bool)
- func Hierarchically(changes file.Changes)
- func Natural(changes file.Changes, reverseSort bool)
- func Pairs(changes file.Changes, pairOrder []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BySize ¶
BySize sorts the file changes in place based on their file size, either in ascending or descending order depending on the `reverseSort` flag.
func ByStringVar ¶
ByStringVar sorts changes by user-specified string variable (lexicographically).
func ByTime ¶
ByTime sorts the changes by the specified file timing attribute (modified time, access time, change time, or birth time).
func ForRenamingAndUndo ¶
ForRenamingAndUndo 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.
func Hierarchically ¶
Hierarchically ensures all files in the same directory are sorted before children directories.
Types ¶
This section is empty.