(app_root: Path, app_name: str)
| 204 | return file_path |
| 205 | |
| 206 | def _get_tmp_agent_root(app_root: Path, app_name: str) -> Path: |
| 207 | tmp_agent_root = app_root / "tmp" / app_name |
| 208 | resolved_tmp_agent_root = tmp_agent_root.resolve() |
| 209 | if not resolved_tmp_agent_root.is_relative_to(app_root): |
| 210 | raise ValueError(f"Invalid tmp path for app: {app_name!r}") |
| 211 | return tmp_agent_root |
| 212 | |
| 213 | def copy_dir_contents(source_dir: Path, dest_dir: Path) -> None: |
| 214 | dest_dir.mkdir(parents=True, exist_ok=True) |
no test coverage detected