diff options
Diffstat (limited to 'lib/filestorage')
-rw-r--r-- | lib/filestorage/common.php | 4 | ||||
-rw-r--r-- | lib/filestorage/local.php | 14 |
2 files changed, 4 insertions, 14 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php index 633c2fdfc76..00c76796c57 100644 --- a/lib/filestorage/common.php +++ b/lib/filestorage/common.php @@ -204,7 +204,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage { unlink($tmpFile); return $mime; } - public function hash($type,$path,$raw){ + public function hash($type,$path,$raw = false){ $tmpFile=$this->getLocalFile(); $hash=hash($type,$tmpFile,$raw); unlink($tmpFile); @@ -229,7 +229,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage { } $tmpFile=OC_Helper::tmpFile($extension); $target=fopen($tmpFile,'w'); - $count=OC_Helper::streamCopy($source,$target); + OC_Helper::streamCopy($source,$target); return $tmpFile; } // abstract public function touch($path, $mtime=null); diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index 658e14eaf9d..6be04db96ae 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -4,7 +4,6 @@ */ class OC_Filestorage_Local extends OC_Filestorage_Common{ protected $datadir; - private static $mimetypes=null; public function __construct($arguments){ $this->datadir=$arguments['datadir']; if(substr($this->datadir,-1)!=='/'){ @@ -41,7 +40,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ } public function filesize($path){ if($this->is_dir($path)){ - return $this->getFolderSize($path); + return 0; }else{ return filesize($this->datadir.$path); } @@ -157,7 +156,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ return $return; } - public function hash($type,$path,$raw){ + public function hash($path,$type,$raw=false){ return hash_file($type,$this->datadir.$path,$raw); } @@ -187,15 +186,6 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ } /** - * @brief get the size of folder and it's content - * @param string $path file path - * @return int size of folder and it's content - */ - public function getFolderSize($path){ - return 0;//depricated, use OC_FileCach instead - } - - /** * check if a file or folder has been updated since $time * @param int $time * @return bool |