From 54f1855ea9b0b3fdc709b9f4a1a036890ba9eefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Fri, 20 Jun 2014 16:14:15 +0200 Subject: [PATCH] more folder methods for server directory --- application/core/Server/Directory.php | 37 +++++++++++++++++++-------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/application/core/Server/Directory.php b/application/core/Server/Directory.php index 796a34cf..d05514eb 100644 --- a/application/core/Server/Directory.php +++ b/application/core/Server/Directory.php @@ -12,7 +12,6 @@ use ManiaControl\ManiaControl; * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 */ class Directory { - /** * Private Properties */ @@ -27,15 +26,6 @@ class Directory { $this->maniaControl = $maniaControl; } - /** - * Retrieve the Game Data Folder Path - * - * @return string - */ - public function getGameDataFolder() { - return $this->maniaControl->client->gameDataDirectory(); - } - /** * Retrieve the Maps Folder Path * @@ -53,4 +43,31 @@ class Directory { public function getSkinsFolder() { return $this->maniaControl->client->getSkinsDirectory(); } + + /** + * Retrieve the Logs Folder Path + * + * @return string + */ + public function getLogsFolder() { + return $this->getGameDataFolder() . '..' . DIRECTORY_SEPARATOR . 'Logs' . DIRECTORY_SEPARATOR; + } + + /** + * Retrieve the Game Data Folder Path + * + * @return string + */ + public function getGameDataFolder() { + return $this->maniaControl->client->gameDataDirectory(); + } + + /** + * Retrieve the Cache Folder Path + * + * @return string + */ + public function getCacheFolder() { + return $this->getGameDataFolder() . '..' . DIRECTORY_SEPARATOR . 'CommonData' . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR; + } }