You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

filestorage.php 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * ownCloud
  4. *
  5. * @author Frank Karlitschek
  6. * @copyright 2010 Frank Karlitschek karlitschek@kde.org
  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. * Privde a common interface to all different storage options
  23. */
  24. class OC_Filestorage{
  25. public function __construct($parameters){}
  26. public function mkdir($path){}
  27. public function rmdir($path){}
  28. public function opendir($path){}
  29. public function is_dir($path){}
  30. public function is_file($path){}
  31. public function stat($path){}
  32. public function filetype($path){}
  33. public function filesize($path){}
  34. public function is_readable($path){}
  35. public function is_writeable($path){}
  36. public function file_exists($path){}
  37. public function readfile($path){}
  38. public function filectime($path){}
  39. public function filemtime($path){}
  40. public function fileatime($path){}
  41. public function file_get_contents($path){}
  42. public function file_put_contents($path,$data){}
  43. public function unlink($path){}
  44. public function rename($path1,$path2){}
  45. public function copy($path1,$path2){}
  46. public function fopen($path,$mode){}
  47. public function toTmpFile($path){}//copy the file to a temporary file, used for cross-storage file actions
  48. public function fromTmpFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions
  49. public function fromUploadedFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions
  50. public function getMimeType($path){}
  51. public function delTree($path){}
  52. public function find($path){}
  53. public function getTree($path){}
  54. public function hash($type,$path,$raw){}
  55. public function free_space($path){}
  56. public function search($query){}
  57. public function getLocalFile($path){}// get a path to a local version of the file, whether the original file is local or remote
  58. }