filestorage.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_writable($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 file_get_contents($path){}
  41. public function file_put_contents($path,$data){}
  42. public function unlink($path){}
  43. public function rename($path1,$path2){}
  44. public function copy($path1,$path2){}
  45. public function fopen($path,$mode){}
  46. public function toTmpFile($path){}//copy the file to a temporary file, used for cross-storage file actions
  47. public function fromTmpFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions
  48. public function getMimeType($path){}
  49. public function hash($type,$path,$raw){}
  50. public function free_space($path){}
  51. public function search($query){}
  52. public function getLocalFile($path){}// get a path to a local version of the file, whether the original file is local or remote
  53. }