diff options
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; |