MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / extractor_for_file

Method extractor_for_file

src/extraction/mod.rs:332–338  ·  view source on GitHub ↗

Returns the extractor for a file path based on its extension.

(&self, path: &str)

Source from the content-addressed store, hash-verified

330
331 /// Returns the extractor for a file path based on its extension.
332 pub fn extractor_for_file(&self, path: &str) -> Option<&dyn LanguageExtractor> {
333 let ext = path.rsplit('.').next()?;
334 self.extractors
335 .iter()
336 .find(|e| e.extensions().contains(&ext))
337 .map(std::convert::AsRef::as_ref)
338 }
339
340 /// Returns all supported file extensions across all extractors.
341 pub fn supported_extensions(&self) -> Vec<&str> {

Callers 4

process_requestFunction · 0.80
extract_files_in_processFunction · 0.80
reindex_fileMethod · 0.80
ensure_fingerprintsFunction · 0.80

Calls 2

containsMethod · 0.45
extensionsMethod · 0.45

Tested by

no test coverage detected