Source code for src.Common.Utils.PathHelper

from os.path import dirname, abspath, exists
from os import makedirs


[docs]def GetRootPath() -> str: rootPath = dirname(dirname(dirname(dirname(abspath(__file__))))) return rootPath
[docs]def EnsurePathExists(path:str) -> None: # remove the file part of the path if it is a file if "." in path: path = dirname(path) if not exists(path): makedirs(path) return