MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / _resolve_dir

Function _resolve_dir

autoforge_paths.py:72–87  ·  view source on GitHub ↗

Resolve a directory path using tri-path strategy. Same logic as ``_resolve_path`` but intended for directories such as ``prompts/``.

(project_dir: Path, dirname: str)

Source from the content-addressed store, hash-verified

70
71
72def _resolve_dir(project_dir: Path, dirname: str) -> Path:
73 """Resolve a directory path using tri-path strategy.
74
75 Same logic as ``_resolve_path`` but intended for directories such as
76 ``prompts/``.
77 """
78 new = project_dir / ".autoforge" / dirname
79 if new.exists():
80 return new
81 legacy = project_dir / ".autocoder" / dirname
82 if legacy.exists():
83 return legacy
84 old = project_dir / dirname
85 if old.exists():
86 return old
87 return new
88
89
90# ---------------------------------------------------------------------------

Callers 1

get_prompts_dirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected