diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-02 15:05:29 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-14 12:54:42 +0100 |
commit | 5fae07f422eede80d7ace5f909f9f9ea853d7d89 (patch) | |
tree | 86c18f69664c2df6aa6a6f1830db2fa9d03a4701 /lib/private/files/cache | |
parent | 6d321f5f6b4e22f0c8124572662361a1f53e7c3a (diff) | |
download | nextcloud-server-5fae07f422eede80d7ace5f909f9f9ea853d7d89.tar.gz nextcloud-server-5fae07f422eede80d7ace5f909f9f9ea853d7d89.zip |
add scanner interface
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r-- | lib/private/files/cache/scanner.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index fa12378ae94..92151149374 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -37,6 +37,7 @@ namespace OC\Files\Cache; use OC\Files\Filesystem; use OC\Hooks\BasicEmitter; use OCP\Config; +use OCP\Files\Cache\IScanner; use OCP\Lock\ILockingProvider; /** @@ -50,7 +51,7 @@ use OCP\Lock\ILockingProvider; * * @package OC\Files\Cache */ -class Scanner extends BasicEmitter { +class Scanner extends BasicEmitter implements IScanner { /** * @var \OC\Files\Storage\Storage $storage */ @@ -81,12 +82,6 @@ class Scanner extends BasicEmitter { */ protected $lockingProvider; - const SCAN_RECURSIVE = true; - const SCAN_SHALLOW = false; - - const REUSE_ETAG = 1; - const REUSE_SIZE = 2; - public function __construct(\OC\Files\Storage\Storage $storage) { $this->storage = $storage; $this->storageId = $this->storage->getId(); @@ -112,7 +107,7 @@ class Scanner extends BasicEmitter { * @param string $path * @return array an array of metadata of the file */ - public function getData($path) { + protected function getData($path) { $data = $this->storage->getMetaData($path); if (is_null($data)) { \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not accessible or present !!!", \OCP\Util::DEBUG); |