first commit
This commit is contained in:
22
proxy_chain_manager/paths.py
Normal file
22
proxy_chain_manager/paths.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def app_data_dir() -> Path:
|
||||
if sys.platform == "darwin":
|
||||
base = Path.home() / "Library" / "Application Support"
|
||||
elif os.environ.get("LOCALAPPDATA"):
|
||||
base = Path(os.environ["LOCALAPPDATA"])
|
||||
else:
|
||||
base = Path.home() / "AppData" / "Local"
|
||||
d = base / "ProxyChainManager"
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
return d
|
||||
|
||||
|
||||
def gost_exe_path() -> Path:
|
||||
suffix = ".exe" if sys.platform == "win32" else ""
|
||||
return app_data_dir() / f"gost{suffix}"
|
||||
Reference in New Issue
Block a user