Where is installed module info stored

In the module loader, where is the information stored that shows the modules installed?

I have searched and search both the code and the database and haven’t found where it is stored.

Any ideas?

Thanx

I’m not sure but I think system scans the /upload folder.

I have been looking into this,
I’ve been able to piece together the following

<?php

require_once 'ModuleInstall/PackageManager/PackageManager.php';
$pm = new PackageManager();
$installedModulesInfo = $pm->getinstalledPackages();
echo var_export($installedModulesInfo, true);

This will print out the information about installed packages,
Same information which is found on the module loader admin page.

Discovered PackageManagerDisplay referenced in modules/Administration/UpgradeWizard.php

Then read through PackageManagerDisplay until I discovered PackageManager->getinstalledPackages