MCPcopy Create free account
hub / github.com/google/adk-python / _walk_to_root_until_found

Function _walk_to_root_until_found

src/google/adk/cli/utils/envs.py:41–50  ·  view source on GitHub ↗
(folder, filename)

Source from the content-addressed store, hash-verified

39
40
41def _walk_to_root_until_found(folder, filename) -> str:
42 checkpath = os.path.join(folder, filename)
43 if os.path.exists(checkpath) and os.path.isfile(checkpath):
44 return checkpath
45
46 parent_folder = os.path.dirname(folder)
47 if parent_folder == folder: # reached the root
48 return ''
49
50 return _walk_to_root_until_found(parent_folder, filename)
51
52
53def load_dotenv_for_agent(

Callers 1

load_dotenv_for_agentFunction · 0.85

Calls 2

joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected