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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. abstract class OC_Filestorage{
  25. public function __construct($parameters){}
  26. abstract public function mkdir($path);
  27. abstract public function rmdir($path);
  28. abstract public function opendir($path);
  29. abstract public function is_dir($path);
  30. abstract public function is_file($path);
  31. abstract public function stat($path);
  32. abstract public function filetype($path);
  33. abstract public function filesize($path);
  34. abstract public function is_readable($path);
  35. abstract public function is_writable($path);
  36. abstract public function file_exists($path);
  37. abstract public function filectime($path);
  38. abstract public function filemtime($path);
  39. abstract public function file_get_contents($path);
  40. abstract public function file_put_contents($path,$data);
  41. abstract public function unlink($path);
  42. abstract public function rename($path1,$path2);
  43. abstract public function copy($path1,$path2);
  44. abstract public function fopen($path,$mode);
  45. abstract public function getMimeType($path);
  46. abstract public function hash($type,$path,$raw);
  47. abstract public function free_space($path);
  48. abstract public function search($query);
  49. abstract public function touch($path, $mtime=null);
  50. abstract public function getLocalFile($path);// get a path to a local version of the file, whether the original file is local or remote
  51. }