def getFile(url, destdir, filename='', quiet=None) -> bool:
    "download file from 'url' into 'destdir'"
    if (quiet is None):
        quiet = CraftCore.settings.getboolean('ContinuousIntegration', 'Enabled', False)
    CraftCore.log.debug(('getFile called. url: %s' % url))
    if (url == ''):
        CraftCore.log.error('fetch: no url given')
        return False
    pUrl = urllib.parse.urlparse(url)
    if (not filename):
        filename = os.path.basename(pUrl.path)
    utils.createDir(destdir)
    if (pUrl.scheme == 's3'):
        return s3File(url, destdir, filename)
    elif (pUrl.scheme == 'minio'):
        return minioGet((pUrl.netloc + pUrl.path), destdir, filename)
    if ((not CraftCore.compiler.isWindows) or os.path.exists(os.path.join(CraftCore.standardDirs.etcDir(), 'cacert.pem'))):
        if (not CraftCore.settings.getboolean('General', 'NoWget')):
            if CraftCore.cache.findApplication('wget'):
                return wgetFile(url, destdir, filename, quiet)
        if CraftCore.cache.findApplication('curl'):
            return curlFile(url, destdir, filename, quiet)
    if os.path.exists(os.path.join(destdir, filename)):
        return True
    powershell = CraftCore.cache.findApplication('powershell')
    if powershell:
        filename = os.path.join(destdir, filename)
        return utils.system([powershell, '-NoProfile', '-ExecutionPolicy', 'ByPass', '-Command', f'[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.webclient).DownloadFile("{url}", "{filename}")'])
    else:

        def dlProgress(count, blockSize, totalSize):
            if (totalSize != (- 1)):
                percent = int((((count * blockSize) * 100) / totalSize))
                utils.printProgress(percent)
            else:
                sys.stdout.write(('\r%s bytes downloaded' % (count * blockSize)))
                sys.stdout.flush()
        try:
            urllib.request.urlretrieve(url, filename=os.path.join(destdir, filename), reporthook=(dlProgress if (CraftCore.debug.verbose() >= 0) else None))
        except Exception as e:
            CraftCore.log.warning(e)
            return False
    if (CraftCore.debug.verbose() >= 0):
        sys.stdout.write('\n')
        sys.stdout.flush()
    return True
download file from 'url' into 'destdir'
def getFile(url, destdir, filename=, quiet=None) -> bool:
    
    if (quiet is None):
        quiet = CraftCore.settings.getboolean('ContinuousIntegration', 'Enabled', False)
    CraftCore.log.debug(('getFile called. url: %s' % url))
    if (url == ):
        CraftCore.log.error('fetch: no url given')
        return False
    pUrl = urllib.parse.urlparse(url)
    if (not filename):
        filename = os.path.basename(pUrl.path)
    utils.createDir(destdir)
    if (pUrl.scheme == 's3'):
        return s3File(url, destdir, filename)
    elif (pUrl.scheme == 'minio'):
        return minioGet((pUrl.netloc + pUrl.path), destdir, filename)
    if ((not CraftCore.compiler.isWindows) or os.path.exists(os.path.join(CraftCore.standardDirs.etcDir(), 'cacert.pem'))):
        if (not CraftCore.settings.getboolean('General', 'NoWget')):
            if CraftCore.cache.findApplication('wget'):
                return wgetFile(url, destdir, filename, quiet)
        if CraftCore.cache.findApplication('curl'):
            return curlFile(url, destdir, filename, quiet)
    if os.path.exists(os.path.join(destdir, filename)):
        return True
    powershell = CraftCore.cache.findApplication('powershell')
    if powershell:
        filename = os.path.join(destdir, filename)
        return utils.system([powershell, '-NoProfile', '-ExecutionPolicy', 'ByPass', '-Command', f'[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.webclient).DownloadFile("{url}", "{filename}")'])
    else:

        def dlProgress(count, blockSize, totalSize):
            if (totalSize != (- 1)):
                percent = int((((count * blockSize) * 100) / totalSize))
                utils.printProgress(percent)
            else:
                sys.stdout.write(('\r%s bytes downloaded' % (count * blockSize)))
                sys.stdout.flush()
        try:
            urllib.request.urlretrieve(url, filename=os.path.join(destdir, filename), reporthook=(dlProgress if (CraftCore.debug.verbose() >= 0) else None))
        except Exception as e:
            CraftCore.log.warning(e)
            return False
    if (CraftCore.debug.verbose() >= 0):
        sys.stdout.write('\n')
        sys.stdout.flush()
    return True