@ 260812.1

240717.1 · 861d71210c7ddf5ed40eb2909bac7c04da3b3b89

fastwalk: add optional sorting and improve documentation

This commit adds the new SortMode and Config.Sort setting to sort a directory's entries before they are processed. This does not make the global order that directories and entries are visited non-deterministic but it does help make the output a bit saner compared to the default directory order. This was added to make the output of FZF a bit nicer.

This commit also improves documentation and comments of exported functions.

reading declarations

Changes to entry_filter_unix.go. All files

entry_filter_unix.go

@@ -48,7 +48,7 @@ func (e *EntryFilter) seen(dev, ino uint64) (seen bool) {  // TODO: this name is confusing and should be fixed -// Entry returns if path and fs.DirEntry have been seen before.+// Entry returns if path and [fs.DirEntry] have been seen before. func (e *EntryFilter) Entry(path string, de fs.DirEntry) (seen bool) { 	fi, err := StatDirEntry(path, de) 	if err != nil {