diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-22 15:24:23 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-22 18:21:17 +0100 |
commit | c62cce826994291c528e7cc90da5be9fc94ebaf2 (patch) | |
tree | 3602d649ca5947113eb36f521aa144194920f43c /lib/private | |
parent | a49e873d3fa513136bfdf1d71bbc2bbcd61d3650 (diff) | |
download | nextcloud-server-c62cce826994291c528e7cc90da5be9fc94ebaf2.tar.gz nextcloud-server-c62cce826994291c528e7cc90da5be9fc94ebaf2.zip |
Moved default isReadable/isUpdatable impl into Common class
Also adjusted all ext storage backends to not override these when the
default behavior is expected.
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/storage/common.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index f99bbc9ae5e..678bf419023 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -51,6 +51,19 @@ abstract class Common implements \OC\Files\Storage\Storage { } } + public function isReadable($path) { + // at least check whether it exists + // subclasses might want to implement this more thoroughly + return $this->file_exists($path); + } + + public function isUpdatable($path) { + // at least check whether it exists + // subclasses might want to implement this more thoroughly + // a non-existing file/folder isn't updatable + return $this->file_exists($path); + } + public function isCreatable($path) { if ($this->is_dir($path) && $this->isUpdatable($path)) { return true; |