创建文件
(filepath: str, content: str)
| 13 | BACKEND_DIR = PROJECT_ROOT / "backend" |
| 14 | |
| 15 | def create_file(filepath: str, content: str): |
| 16 | """创建文件""" |
| 17 | path = Path(filepath) |
| 18 | path.parent.mkdir(parents=True, exist_ok=True) |
| 19 | with open(path, "w", encoding="utf-8") as f: |
| 20 | f.write(content) |
| 21 | print(f"✅ 创建文件: {filepath}") |
| 22 | |
| 23 | def main(): |
| 24 | print("🚀 开始创建黄金市场分析系统项目...") |