Documentation ¶
Index ¶
- Variables
- func FlagCompletionFunc(allCompletions []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- type Box
- type BoxOption
- func WithAscend(ascend bool) BoxOption
- func WithCWD(cwd bool) BoxOption
- func WithDay(dayNew int, dayOld int) BoxOption
- func WithDirectory(directory string) BoxOption
- func WithGetSize(get bool) BoxOption
- func WithLimitLast(last int) BoxOption
- func WithQueries(queries []string) BoxOption
- func WithQueryMode(mode ModeByType) BoxOption
- func WithSize(large string, small string) BoxOption
- func WithSortBy(sortBy SortByType) BoxOption
- func WithTrashDir(trashDir string) BoxOption
- type File
- type Group
- type ModeByType
- type SortByType
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
View Source
var ( ModeByFlagCompletionFunc = FlagCompletionFunc( maps.Keys(modeByWellKnownStrings), ) )
View Source
var ( SortByFlagCompletionFunc = FlagCompletionFunc( maps.Keys(sortByWellKnownStrings), ) )
Functions ¶
func FlagCompletionFunc ¶
Types ¶
type Box ¶
type Box struct { Files []File FilesByTrashDir map[string][]File // key: trash_dir, value: array of Files TrashDirs []string OrphanMeta []File // .trashinfo exists but there is no real file in the files folder // Whether to use stat(2) to get size and mode GetSize bool // contains filtered or unexported fields }
type BoxOption ¶
type BoxOption func(*Box)
func WithAscend ¶
func WithDirectory ¶
func WithGetSize ¶
func WithLimitLast ¶
func WithQueries ¶
func WithQueryMode ¶
func WithQueryMode(mode ModeByType) BoxOption
func WithSortBy ¶
func WithSortBy(sortBy SortByType) BoxOption
func WithTrashDir ¶ added in v0.0.3
type File ¶
type File struct { Name string // .vimrc OriginalPath string // ~/.vimrc (Info.Path) TrashPath string // ~/.local/share/Trash/files/.vimrc TrashInfoPath string // ~/.local/share/Trash/info/.vimrc.trashinfo DeletedAt time.Time // 2023-01-01T00:00:00 (Info.DeletionDate) IsDir bool // optionals below Size *int64 // nil if could not get, It may not be able to be taken due to permission violation, etc. Mode fs.FileMode }
func (*File) TrashPathColor ¶
type ModeByType ¶
type ModeByType int
const ( ModeByRegex ModeByType = iota ModeByGlob // default ModeByLiteral ModeByFull )
func (*ModeByType) Set ¶
func (s *ModeByType) Set(str string) error
func (ModeByType) String ¶
func (s ModeByType) String() string
func (ModeByType) Type ¶
func (s ModeByType) Type() string
type SortByType ¶
type SortByType int
const ( SortByDeletedAt SortByType = iota // default SortBySize SortByName )
func (*SortByType) Set ¶
func (s *SortByType) Set(str string) error
func (SortByType) String ¶
func (s SortByType) String() string
func (SortByType) Type ¶
func (s SortByType) Type() string
Click to show internal directories.
Click to hide internal directories.