[Pkg-owncloud-commits] [owncloud] 146/258: Expose creatable permissions trough fileinfo
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit e37f44e56a9e18b794242b9d855de80c2b48a6c3
Author: Robin Appelman <icewind at owncloud.com>
Date: Wed Sep 24 17:49:52 2014 +0200
Expose creatable permissions trough fileinfo
---
lib/private/files/fileinfo.php | 9 +++++++++
lib/public/files/fileinfo.php | 7 +++++++
2 files changed, 16 insertions(+)
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php
index 716b7d3..8457a2d 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 b9c8258..55bd806 100644
--- a/lib/public/files/fileinfo.php
+++ b/lib/public/files/fileinfo.php
@@ -123,6 +123,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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list