|
@@ 73-81 (lines=9) @@
|
| 70 |
|
* |
| 71 |
|
* @inheritdoc |
| 72 |
|
*/ |
| 73 |
|
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { |
| 74 |
|
$sourceScanner = $this->getSourceScanner(); |
| 75 |
|
if ($sourceScanner instanceof NoopScanner) { |
| 76 |
|
list(, $internalPath) = $this->storage->resolvePath($path); |
| 77 |
|
return $sourceScanner->scan($internalPath, $recursive, $reuse, $lock); |
| 78 |
|
} else { |
| 79 |
|
return parent::scan($path, $recursive, $reuse, $lock); |
| 80 |
|
} |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
/** |
| 84 |
|
* scan a single file and use source scanner if needed |
|
@@ 88-96 (lines=9) @@
|
| 85 |
|
* |
| 86 |
|
* @inheritdoc |
| 87 |
|
*/ |
| 88 |
|
public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true) { |
| 89 |
|
$sourceScanner = $this->getSourceScanner(); |
| 90 |
|
if ($sourceScanner instanceof NoopScanner) { |
| 91 |
|
list(, $internalPath) = $this->storage->resolvePath($file); |
| 92 |
|
return parent::scan($internalPath, $reuseExisting, $parentId, $cacheData, $lock); |
| 93 |
|
} else { |
| 94 |
|
return parent::scanFile($file, $reuseExisting, $parentId, $cacheData, $lock); |
| 95 |
|
} |
| 96 |
|
} |
| 97 |
|
} |
| 98 |
|
|