summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-11-17 12:30:52 +0100
committerJulius Haertl <jus@bitgrid.net>2016-11-17 19:24:24 +0100
commitcaacb6c261140cd8f86ba5e430d2d9af217eae45 (patch)
treeae0f85faf2600eeabbea254537f1cb9fc29535b1 /lib/public
parentde983e61e3660964154d1c7f447ca8a2055cc2d6 (diff)
downloadnextcloud-server-caacb6c261140cd8f86ba5e430d2d9af217eae45.tar.gz
nextcloud-server-caacb6c261140cd8f86ba5e430d2d9af217eae45.zip
Expose getAppPath to public API
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/App/AppPathNotFoundException.php31
-rw-r--r--lib/public/App/IAppManager.php10
2 files changed, 41 insertions, 0 deletions
diff --git a/lib/public/App/AppPathNotFoundException.php b/lib/public/App/AppPathNotFoundException.php
new file mode 100644
index 00000000000..071eb2f8377
--- /dev/null
+++ b/lib/public/App/AppPathNotFoundException.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
+ *
+ * @author Julius Härtl <jus@bitgrid.net>
+ *
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCP\App;
+
+/**
+ * Class AppPathNotFoundException
+ *
+ * @package OCP\App
+ * @since 11.0.0
+ */
+class AppPathNotFoundException extends \Exception {} \ No newline at end of file
diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php
index 44990b7c47c..057a964ce0a 100644
--- a/lib/public/App/IAppManager.php
+++ b/lib/public/App/IAppManager.php
@@ -79,6 +79,16 @@ interface IAppManager {
public function disableApp($appId);
/**
+ * Get the directory for the given app.
+ *
+ * @param string $appId
+ * @return string
+ * @since 11.0.0
+ * @throws AppPathNotFoundException
+ */
+ public function getAppPath($appId);
+
+ /**
* List all apps enabled for a user
*
* @param \OCP\IUser $user