Skip to main content

is_scannable

Function is_scannable 

Source
pub fn is_scannable(candidate: &Candidate, rules_path: Option<&[u8]>) -> bool
Expand description

What: Whether a candidate is given to the scanner. Option<&[u8]> is “the rules file’s pathname bytes or nothing”. Why: A deleted path has no content and leaves the tree; the rule-source files and the rules file itself would match their own patterns. Every other candidate is scanned, whatever its mode.

In TS you’d write (pseudocode):

function isScannable(candidate: Candidate, rulesPath?: string): boolean;