MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / find_abs_path

Function find_abs_path

src/hyperagent/utils.py:332–342  ·  view source on GitHub ↗
(folder, file_name)

Source from the content-addressed store, hash-verified

330 return non_utf8_files
331
332def find_abs_path(folder, file_name):
333 # Walk through the directory and its subdirectories
334 for root, dirs, files in os.walk(folder):
335 # Construct the potential full path
336 potential_path = os.path.join(root, file_name)
337 # Check if this potential path is a file
338 if os.path.isfile(potential_path):
339 # Return the absolute path of the file
340 return os.path.abspath(potential_path)
341 # If file is not found, return None
342 return None
343
344def run_ctags(file_path):
345 MAIN_KINDS = {"module": SymbolKind.Module, "namespace": SymbolKind.Namespace, "class": SymbolKind.Class, "method": SymbolKind.Method, "function": SymbolKind.Function, "member": SymbolKind.Method}

Callers

nothing calls this directly

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected