(dirName)
return retVal
Returns all JS files under dirName
Returns all JS files under dirName
Returns all JS files under dirName
def getAllJSFiles(dirName):
    '''
    Returns all JS files under dirName
    '''
    retVal = []
    if os.path.isfile(dirName) and dirName.endswith(".js"):
        retVal = [dirName]
    elif os.path.isdir(dirName):
        tempList = [os.path.join(dirName, x) for x in os.listdir(dirName)]
        for x in tempList:
            retVal += getAllJSFiles(x)
    #else:
    #    raise Exception("getAllJSFiles: encountered a non-file/non-dir:" + dirName)
    return retVal
def getAllJSFiles ( dirName ) : retVal = [ ] if os . path . isfile ( dirName ) and dirName . endswith ( ".js" ) : retVal = [ dirName ] elif os . path . isdir ( dirName ) : tempList = [ os . path . join ( dirName , x ) for x in os . listdir ( dirName ) ] for x in tempList : retVal += getAllJSFiles ( x ) #else: #    raise Exception("getAllJSFiles: encountered a non-file/non-dir:" + dirName) return retVal