| @@ 273-287 (lines=15) @@ | ||
| 270 | $mounts = array_reverse($mounts); |
|
| 271 | ||
| 272 | $nodes = array(); |
|
| 273 | foreach ($mounts as $mount) { |
|
| 274 | /** |
|
| 275 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 276 | */ |
|
| 277 | if ($mount->getStorage()) { |
|
| 278 | $cache = $mount->getStorage()->getCache(); |
|
| 279 | $internalPath = $cache->getPathById($id); |
|
| 280 | if (is_string($internalPath)) { |
|
| 281 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 282 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 283 | $nodes[] = $this->get($path); |
|
| 284 | } |
|
| 285 | } |
|
| 286 | } |
|
| 287 | } |
|
| 288 | return $nodes; |
|
| 289 | } |
|
| 290 | ||
| @@ 1618-1632 (lines=15) @@ | ||
| 1615 | // reverse the array so we start with the storage this view is in |
|
| 1616 | // which is the most likely to contain the file we're looking for |
|
| 1617 | $mounts = array_reverse($mounts); |
|
| 1618 | foreach ($mounts as $mount) { |
|
| 1619 | /** |
|
| 1620 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 1621 | */ |
|
| 1622 | if ($mount->getStorage()) { |
|
| 1623 | $cache = $mount->getStorage()->getCache(); |
|
| 1624 | $internalPath = $cache->getPathById($id); |
|
| 1625 | if (is_string($internalPath)) { |
|
| 1626 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 1627 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 1628 | return $path; |
|
| 1629 | } |
|
| 1630 | } |
|
| 1631 | } |
|
| 1632 | } |
|
| 1633 | throw new NotFoundException(sprintf('File with id "%s" has not been found.', $id)); |
|
| 1634 | } |
|
| 1635 | ||