@@ 322-324 (lines=3) @@ | ||
319 | * @throws \OC\ServerNotAvailableException |
|
320 | */ |
|
321 | public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { |
|
322 | if ($reuse === -1) { |
|
323 | $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG; |
|
324 | } |
|
325 | if ($lock && $this->storage->instanceOfStorage(ILockingStorage::class)) { |
|
326 | $this->storage->acquireLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider); |
|
327 | $this->storage->acquireLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider); |
|
@@ 391-393 (lines=3) @@ | ||
388 | * @throws \OCP\Lock\LockedException |
|
389 | */ |
|
390 | protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderId = null, $lock = true) { |
|
391 | if ($reuse === -1) { |
|
392 | $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG; |
|
393 | } |
|
394 | $this->emit('\OC\Files\Cache\Scanner', 'scanFolder', [$path, $this->storageId]); |
|
395 | $size = 0; |
|
396 | if ($folderId !== null) { |