Versions in this module Expand all Collapse all v0 v0.0.1 Apr 10, 2024 Changes in this version + const Archive + const Audio + const Image + const MaskArchive + const MaskAudio + const MaskImage + const MaskVideo + const MaskZipLike + const N + const Other + const Video + const ZipLike + var CntMap = map[string]uint32 + var CntMasks = map[uint32][]string + func AsMask(sar []string) uint32 + func BuildWalkDirFn(fns []Filter, res *Result) func(string, fs.DirEntry, error) error + func Clamp[T constraints.Ordered](val, lower, upper T) (res T) + func GenNgrams(sar []string, n int) (map[string]int, int) + func GetScoringFunction(queries []string) func(string) float32 + func ImplicitSlice(opts *Options) + func Initialize(opts *Options) (*Result, []Filter, []Process) + func PrintWithBuf(files []*Finfo, opts *Options) + func ProcessList(res *Result, fns []Process) + func RegisterMasks(mask uint32, keys ...string) + func Reverse[T any](filenames []T) []T + func Slice[T any](pat string, input []T) (_ []T, err error) + func SortByScore[T any](files ScoredFiles[T]) + func StrToMask(str string) uint32 + func Traverse(wfn fs.WalkDirFunc, opts *Options) + func TraverseZip(path string, depth int, wfn fs.WalkDirFunc, opts *Options) + type Filter func(*Finfo, fs.DirEntry) bool + func CollectFilters(opts *Options) []Filter + func FilterList(opts *Options) Filter + type FilterOpts struct + DirOnly bool + Exclude []string + FileOnly bool + Ignore []string + Include []string + Search []string + SearchAnd bool + type Finfo struct + IsArchive bool + IsDir bool + Mask uint32 + Name string + Path string + Vany int64 + type ListingOpts struct + Archive bool + FromDepth int + Recurse bool + ToDepth int + type Options struct + Args []string + func Parse(args []string) *Options + type Printing struct + Absolute bool + Clipboard bool + Debug bool + Quiet bool + Tree bool + type Process func(filenames []*Finfo) []*Finfo + func CollectProcess(opts *Options) []Process + func QueryProcess(opts *Options) Process + func ShuffleProcess(src rand.Source) Process + func SliceProcess(pattern string) Process + func SortProcess(sorting SortBy) Process + type ProcessOpts struct + Ascending bool + Query []string + Seed int64 + Select string + Shuffle bool + Sort string + type Result struct + Files []*Finfo + func Run(opts *Options) *Result + func (r Result) Sar() []string + type ScoredFiles []scored[T] + func (s ScoredFiles[T]) Items() []T + type SortBy uint8 + const ByCreation + const ByMod + const ByName + const ByNone + const BySize + func StrToSortBy(s string) SortBy + type TreeNode struct + func AddFilesToTree(files []*Finfo) *TreeNode + func NewTreeNode(name string) *TreeNode + func (t *TreeNode) AddPath(path string) + func (t *TreeNode) PrintTree(prefix string) + type ZipEntry struct + func (z ZipEntry) Info() (fs.FileInfo, error) + func (z ZipEntry) IsDir() bool + func (z ZipEntry) Name() string + func (z ZipEntry) Type() fs.FileMode