$rootDir = Mage::getBaseDir();
$appDir = Mage::getBaseDir('app');
$mediaDir = Mage::getBaseDir('media');This code returns the path of the media directory where all media files are stored. The `Mage` class is part of the Magento package library and is used for interacting with the Magento application.