| @@ 269-283 (lines=15) @@ | ||
| 266 | $mounts = array_reverse($mounts); |
|
| 267 | ||
| 268 | $nodes = array(); |
|
| 269 | foreach ($mounts as $mount) { |
|
| 270 | /** |
|
| 271 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 272 | */ |
|
| 273 | if ($mount->getStorage()) { |
|
| 274 | $cache = $mount->getStorage()->getCache(); |
|
| 275 | $internalPath = $cache->getPathById($id); |
|
| 276 | if (is_string($internalPath)) { |
|
| 277 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 278 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 279 | $nodes[] = $this->get($path); |
|
| 280 | } |
|
| 281 | } |
|
| 282 | } |
|
| 283 | } |
|
| 284 | return $nodes; |
|
| 285 | } |
|
| 286 | ||
| @@ 1680-1694 (lines=15) @@ | ||
| 1677 | // reverse the array so we start with the storage this view is in |
|
| 1678 | // which is the most likely to contain the file we're looking for |
|
| 1679 | $mounts = array_reverse($mounts); |
|
| 1680 | foreach ($mounts as $mount) { |
|
| 1681 | /** |
|
| 1682 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 1683 | */ |
|
| 1684 | if ($mount->getStorage()) { |
|
| 1685 | $cache = $mount->getStorage()->getCache(); |
|
| 1686 | $internalPath = $cache->getPathById($id); |
|
| 1687 | if (is_string($internalPath)) { |
|
| 1688 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 1689 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 1690 | return $path; |
|
| 1691 | } |
|
| 1692 | } |
|
| 1693 | } |
|
| 1694 | } |
|
| 1695 | throw new NotFoundException(sprintf('File with id "%s" has not been found.', $id)); |
|
| 1696 | } |
|
| 1697 | ||