summaryrefslogtreecommitdiffstats
path: root/lib/private/App/AppManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/App/AppManager.php')
-rw-r--r--lib/private/App/AppManager.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 55fd575e129..fca5c9b87ac 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -31,6 +31,7 @@
namespace OC\App;
+use OCP\App\AppPathNotFoundException;
use OCP\App\IAppManager;
use OCP\App\ManagerEvent;
use OCP\IAppConfig;
@@ -266,6 +267,21 @@ class AppManager implements IAppManager {
}
/**
+ * Get the directory for the given app.
+ *
+ * @param string $appId
+ * @return string
+ * @throws AppPathNotFoundException if app folder can't be found
+ */
+ public function getAppPath($appId) {
+ $appPath = \OC_App::getAppPath($appId);
+ if($appPath === false) {
+ throw new AppPathNotFoundException('Could not find path for ' . $appId);
+ }
+ return $appPath;
+ }
+
+ /**
* Clear the cached list of apps when enabling/disabling an app
*/
public function clearAppsCache() {