|
@@ 317-319 (lines=3) @@
|
| 314 |
|
* @throws \OC\ServerNotAvailableException |
| 315 |
|
*/ |
| 316 |
|
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { |
| 317 |
|
if ($reuse === -1) { |
| 318 |
|
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG; |
| 319 |
|
} |
| 320 |
|
if ($lock && $this->storage->instanceOfStorage(ILockingStorage::class)) { |
| 321 |
|
$this->storage->acquireLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider); |
| 322 |
|
$this->storage->acquireLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider); |
|
@@ 386-388 (lines=3) @@
|
| 383 |
|
* @throws \OCP\Lock\LockedException |
| 384 |
|
*/ |
| 385 |
|
protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderId = null, $lock = true) { |
| 386 |
|
if ($reuse === -1) { |
| 387 |
|
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG; |
| 388 |
|
} |
| 389 |
|
$this->emit('\OC\Files\Cache\Scanner', 'scanFolder', [$path, $this->storageId]); |
| 390 |
|
$size = 0; |
| 391 |
|
if ($folderId !== null) { |