MCPcopy Create free account
hub / github.com/RuoJi6/java-decompile-mcp / download_cfr

Function download_cfr

java_decompiler_mcp/__init__.py:47–61  ·  view source on GitHub ↗

下载 CFR 到指定目录或当前目录

(target_dir: Optional[str] = None)

Source from the content-addressed store, hash-verified

45
46
47def download_cfr(target_dir: Optional[str] = None) -> str:
48 """下载 CFR 到指定目录或当前目录"""
49 if target_dir is None:
50 target_dir = str(Path.cwd())
51
52 target_path = os.path.join(target_dir, CFR_JAR_NAME)
53
54 if os.path.exists(target_path):
55 return target_path
56
57 print(f"正在下载 CFR 到 {target_path}...")
58 urllib.request.urlretrieve(CFR_DOWNLOAD_URL, target_path)
59 print("CFR 下载完成")
60
61 return target_path
62
63
64def ensure_cfr() -> str:

Callers 2

ensure_cfrFunction · 0.85
download_cfr_toolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected