MCPcopy Index your code
hub / github.com/bugy/script-server / has_match

Method has_match

src/utils/file_utils.py:367–377  ·  view source on GitHub ↗
(self, file_path)

Source from the content-addressed store, hash-verified

365 self.matchers = self._create_single_matchers(patterns, working_dir)
366
367 def has_match(self, file_path):
368 if isinstance(file_path, str):
369 file_path = pathlib.Path(file_path)
370
371 absolute_path = file_path.absolute()
372
373 for matcher in self.matchers:
374 if matcher.has_match(absolute_path):
375 return True
376
377 return False
378
379 @staticmethod
380 def _create_single_matchers(patterns, working_dir):

Callers 2

list_filesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected