diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-19 22:29:01 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-19 22:29:01 -0400 |
commit | 82d81e8d39ce69211ec6b29fe3f803c57714b8dd (patch) | |
tree | 09dbd675480a02fd626f6634e083f3d6a01b4404 /lib/filestorage | |
parent | f893d21660695d1d1cd594c102e2bcba6919dee3 (diff) | |
parent | 5eca531f99f9615d1a09bbb0b03dda2063901aa7 (diff) | |
download | nextcloud-server-82d81e8d39ce69211ec6b29fe3f803c57714b8dd.tar.gz nextcloud-server-82d81e8d39ce69211ec6b29fe3f803c57714b8dd.zip |
Merge branch 'share_api'
Conflicts:
apps/contacts/lib/vcard.php
apps/files/index.php
lib/files.php
Diffstat (limited to 'lib/filestorage')
-rw-r--r-- | lib/filestorage/common.php | 13 | ||||
-rw-r--r-- | lib/filestorage/commontest.php | 8 | ||||
-rw-r--r-- | lib/filestorage/local.php | 8 |
3 files changed, 19 insertions, 10 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php index 4f506a31495..c829be62f74 100644 --- a/lib/filestorage/common.php +++ b/lib/filestorage/common.php @@ -54,8 +54,17 @@ abstract class OC_Filestorage_Common extends OC_Filestorage { return $stat['size']; } } -// abstract public function is_readable($path); -// abstract public function is_writable($path); + public function isCreatable($path) { + return $this->isUpdatable($path); + } +// abstract public function isReadable($path); +// abstract public function isUpdatable($path); + public function isDeletable($path) { + return $this->isUpdatable($path); + } + public function isSharable($path) { + return $this->isReadable($path); + } // abstract public function file_exists($path); public function filectime($path) { $stat = $this->stat($path); diff --git a/lib/filestorage/commontest.php b/lib/filestorage/commontest.php index 1b01ff856a3..b5126a407b3 100644 --- a/lib/filestorage/commontest.php +++ b/lib/filestorage/commontest.php @@ -51,11 +51,11 @@ class OC_Filestorage_CommonTest extends OC_Filestorage_Common{ public function filetype($path){ return $this->storage->filetype($path); } - public function is_readable($path){ - return $this->storage->is_readable($path); + public function isReadable($path){ + return $this->storage->isReadable($path); } - public function is_writable($path){ - return $this->storage->is_writable($path); + public function isUpdatable($path){ + return $this->storage->isUpdatable($path); } public function file_exists($path){ return $this->storage->file_exists($path); diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index 2087663809f..22d17469df3 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -45,10 +45,10 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ return filesize($this->datadir.$path); } } - public function is_readable($path){ + public function isReadable($path){ return is_readable($this->datadir.$path); } - public function is_writable($path){ + public function isUpdatable($path){ return is_writable($this->datadir.$path); } public function file_exists($path){ @@ -85,7 +85,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ return $this->delTree($path); } public function rename($path1,$path2){ - if (!$this->is_writable($path1)) { + if (!$this->isUpdatable($path1)) { OC_Log::write('core','unable to rename, file is not writable : '.$path1,OC_Log::ERROR); return false; } @@ -128,7 +128,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ } public function getMimeType($path){ - if($this->is_readable($path)){ + if($this->isReadable($path)){ return OC_Helper::getMimeType($this->datadir.$path); }else{ return false; |