Skip to content
Snippets Groups Projects
Commit 85b09b46 authored by Martin Mareš's avatar Martin Mareš
Browse files

mo.util: Funkce pro přístup ke statickým datovým souborům

parent a915912c
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !81. Comments created here will be created in the context of that merge request.
......@@ -89,6 +89,11 @@ def data_dir(name: str) -> str:
return os.path.join(config.DATA_DIR, name)
def part_path(name: str) -> str:
"""Vrátí cestu k datovém souboru, který se instaluje jako součást pythoních modulů."""
return os.path.normpath(os.path.join(__file__, "..", name))
def link_to_dir(src: str, dest_dir: str, prefix: str = "", suffix: str = "") -> str:
"""Vytvoří hardlink na zdrojový soubor pod unikátním jménem v cílovém adresáři."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment