def get_temp_directory(platform: SUPPORTED_PLATFORMS) -> Path:
    """
    Returns the temporary directory where mov-cli can dump stuff. 
    Files stored here WILL get cleared / deleted automatically by the operating system.
    """
    temp_directory = None

    if platform == "Windows":
        temp_directory = Path(os.getenv("TEMP"))

    elif platform == "Darwin": # NOTE: Path maybe incorrect, please report failures!
        temp_directory = Path(os.getenv("TMPDIR"))

    elif platform == "Linux" or platform == "iOS" or platform == "FreeBSD":
        linux_temp_dir = os.getenv("TMPDIR") # Respect the TMPDIR environment variable on Linux: https://unix.stackexchange.com/a/362107

        if linux_temp_dir is None:
            linux_temp_dir = "/tmp"

        temp_directory = Path(linux_temp_dir)

    elif platform == "Android":
        temp_directory = Path(f"{os.getenv('PREFIX')}/tmp")

    temp_directory = temp_directory.joinpath("mov-cli-temp")
    temp_directory.mkdir(exist_ok = True)

    return temp_directory

    Returns the temporary directory where mov-cli can dump stuff. 
    Files stored here WILL get cleared / deleted automatically by the operating system.
    
mov_cli/utils/paths.py