Expand description
Shared vocabulary for saying which files a command should work on.
Two selections exist, deliberately as separate types:
RowSelectionfor commands that query rows (search,embed,faces,classify,locations). It can filter on anything recorded.PathSelectionfor commands that walk a filesystem (scan,watch). It can only filter on what is knowable before a file is read.
Keeping them separate is the point: adding a predicate to the row side
cannot change what scan accepts, because scan does not take that type.
This module holds the primitives both share. The selections themselves and their resolution follow in the same module.
Structs§
- Path
Selection - What a walking command was asked to work on.
- Resolved
- The outcome of resolving a selection.
- RowSelection
- What a command was asked to work on, over rows already in the database.
- Selection
Ctx - What a command can offer the resolver about itself.
Enums§
- Media
Kind - The coarse kind of a media file.
- Place
Query - A place to select around: either a name needing geocoding, or coordinates.
Functions§
- normalise_
ext - Normalise a user-supplied extension so
.MOV,MOVandmovagree. - path_
matches_ kind - Whether a path matches
kind, judged by extension alone. - row_
matches_ kind - Whether a row’s type matches
kind.