Skip to main content

filter_by_scope

Function filter_by_scope 

Source
pub fn filter_by_scope(store: &KnowledgeStore, file: &str) -> FilteredKnowledge
Expand description

Filter the knowledge store to entries whose scope matches a file path.

Matching rules:

  • A scope of “*” matches everything.
  • A scope ending with “/” is a directory prefix match.
  • Otherwise, exact match on the file path.