import aiohttp


async def download_file(url, file_name) -> bool:
    """
    Download a file to a specified path

    :url -> url of the file
    :file_name -> file path and name with extension of that
    """
    async with aiohttp.ClientSession() as session:
        async with session.get(url) as resp:
            with open(f'contents/{file_name}', mode='wb') as byte_file:
                byte_file.write(await resp.read())
            return resp.status == 200