def getDirectoryFromPath(path: str) -> str:
    """Retrieves the directory string from a path string."""
    path_temp = path.rpartition("/")
    new_path = path_temp[0] + path_temp[1]
    return new_path