Documentation
¶
Overview ¶
Package filesearch finds files and folders by name under some folders, for the search of Files (CasaOS#184). It reads names only, never contents, does not follow links (a link is matched by its own name and not walked into), and stops at a number of hits, a number of entries read or a deadline, whichever comes first, saying so.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultLimits = Limits{Hits: 200, Entries: 200_000, Time: 8 * time.Second}
DefaultLimits is what a search of Files is held to: enough for a person to read, and light enough for a small box.
Functions ¶
This section is empty.
Types ¶
type Limits ¶
type Limits struct {
Hits int // hits returned at most
Entries int // entries read at most
Time time.Duration // how long the walk may take
}
Limits bound one search.