import pathlib


def get_output_dir(generate_dap):
    """Finds which directory to output to, this is dependant on whether we
    are generating the enterprise or oss version of the spec"""
    if generate_dap:
        output_dir = pathlib.Path('./out/enterprise/spec')
    else:
        output_dir = pathlib.Path('./out/oss/spec')
    if not output_dir.exists():
        output_dir.mkdir()
    return output_dir