Package com.tnsai.rag
Class IngestionPathSelector
java.lang.Object
com.tnsai.rag.IngestionPathSelector
Portable include/exclude globs for FILE knowledge-source candidates.
Patterns match the entire root-relative path, using / separators
and no leading slash. * and ? do not cross directories;
** matches zero or more path segments. include is evaluated
first; a match in exclude always wins. An empty include list admits
every path; an empty exclude list admits every include match.
- Since:
- 0.13.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic PatternCompiles one glob or throws with the offending selector.static booleanWhether a/-normalized relative path is admitted.static booleanWhetherrelativePathis admitted by the two selector lists.static StringrelativeKey(Path relativePath) Renders a relative path with/separators, independent of the host filesystem.
-
Method Details
-
compile
Compiles one glob or throws with the offending selector.- Parameters:
glob- selector text- Returns:
- anchored regex
-
matches
WhetherrelativePathis admitted by the two selector lists. -
matches
Whether a/-normalized relative path is admitted. -
relativeKey
Renders a relative path with/separators, independent of the host filesystem.
-