nextcloud/lib/private/files/storage/storage.php

60 lines
1.4 KiB
PHP
Raw Normal View History

2010-05-08 23:32:20 +04:00
<?php
/**
2012-09-07 20:30:48 +04:00
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OC\Files\Storage;
2010-05-08 23:32:20 +04:00
/**
* Provide a common interface to all different storage options
*
* All paths passed to the storage are relative to the storage and should NOT have a leading slash.
2010-05-08 23:32:20 +04:00
*/
interface Storage extends \OCP\Files\Storage {
/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null);
/**
* get a scanner instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
* @return \OC\Files\Cache\Scanner
*/
public function getScanner($path = '', $storage = null);
2012-10-23 18:16:46 +04:00
/**
* get the user id of the owner of a file or folder
*
* @param string $path
* @return string
*/
2012-10-23 18:16:46 +04:00
public function getOwner($path);
/**
* get a watcher instance for the cache
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
* @return \OC\Files\Cache\Watcher
*/
public function getWatcher($path = '', $storage = null);
/**
* @return \OC\Files\Cache\Storage
*/
public function getStorageCache();
2010-05-08 23:32:20 +04:00
}