def checkFile()

in src/python/recursive-rat.py [0:0]


def checkFile(file, dir, ratCommand, gpgCommand, baseReportDirectory):
    '''Checks the given file'''
    if file.endswith('.jar'):
        print "Checking jar ", file
        checkArchive(file, dir, lambda a,b:unzip(a,b), ratCommand, gpgCommand, baseReportDirectory)
    elif file.endswith('.zip'):
        print "Checking zip ", file
        checkArchive(file, dir, lambda a,b:unzip(a,b), ratCommand, gpgCommand, baseReportDirectory)
    elif file.endswith('.tar.gz') or file.endswith('.tgz'):
        print "Checking tgz ", file
        checkArchive(file, dir, lambda a,b:untgz(a,b), ratCommand, gpgCommand, baseReportDirectory)