commontest.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * ownCloud
  4. *
  5. * @author Robin Appelman
  6. * @copyright 2012 Robin Appelman icewind@owncloud.com
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public
  19. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * test implementation for OC_FileStorage_Common with OC_FileStorage_Local
  24. */
  25. class OC_Filestorage_CommonTest extends OC_Filestorage_Common{
  26. /**
  27. * underlying local storage used for missing functions
  28. * @var OC_FileStorage_Local
  29. */
  30. private $storage;
  31. public function __construct($params){
  32. $this->storage=new OC_Filestorage_Local($params);
  33. }
  34. public function mkdir($path){
  35. return $this->storage->mkdir($path);
  36. }
  37. public function rmdir($path){
  38. return $this->storage->rmdir($path);
  39. }
  40. public function opendir($path){
  41. return $this->storage->opendir($path);
  42. }
  43. public function stat($path){
  44. return $this->storage->stat($path);
  45. }
  46. public function filetype($path){
  47. return $this->storage->filetype($path);
  48. }
  49. public function isReadable($path){
  50. return $this->storage->isReadable($path);
  51. }
  52. public function isUpdatable($path){
  53. return $this->storage->isUpdatable($path);
  54. }
  55. public function file_exists($path){
  56. return $this->storage->file_exists($path);
  57. }
  58. public function unlink($path){
  59. return $this->storage->unlink($path);
  60. }
  61. public function fopen($path,$mode){
  62. return $this->storage->fopen($path,$mode);
  63. }
  64. public function free_space($path){
  65. return $this->storage->free_space($path);
  66. }
  67. public function touch($path, $mtime=null){
  68. return $this->storage->touch($path,$mtime);
  69. }
  70. }