summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-09-24 17:49:52 +0200
committerRobin Appelman <icewind@owncloud.com>2014-09-25 14:00:13 +0200
commitccb4475a8d882a28fc84fd2e61c3bfa8ac74e563 (patch)
tree98520f37d29a234e5aaaade2eb55e40e5bed6f75 /lib
parentf46e49529fed8cb60ff846bb959b2f564b14bea6 (diff)
downloadnextcloud-server-ccb4475a8d882a28fc84fd2e61c3bfa8ac74e563.tar.gz
nextcloud-server-ccb4475a8d882a28fc84fd2e61c3bfa8ac74e563.zip
Expose creatable permissions trough fileinfo
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/fileinfo.php9
-rw-r--r--lib/public/files/fileinfo.php7
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php
index 716b7d39402..8457a2d160f 100644
--- a/lib/private/files/fileinfo.php
+++ b/lib/private/files/fileinfo.php
@@ -184,6 +184,15 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
}
/**
+ * Check whether new files or folders can be created inside this folder
+ *
+ * @return bool
+ */
+ public function isCreatable() {
+ return $this->checkPermissions(\OCP\PERMISSION_CREATE);
+ }
+
+ /**
* @return bool
*/
public function isDeletable() {
diff --git a/lib/public/files/fileinfo.php b/lib/public/files/fileinfo.php
index 0279050b858..ec81a541564 100644
--- a/lib/public/files/fileinfo.php
+++ b/lib/public/files/fileinfo.php
@@ -136,6 +136,13 @@ interface FileInfo {
public function isUpdateable();
/**
+ * Check whether new files or folders can be created inside this folder
+ *
+ * @return bool
+ */
+ public function isCreatable();
+
+ /**
* Check if a file or folder can be deleted
*
* @return bool