| @@ 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 | ||
| @@ 1665-1679 (lines=15) @@ | ||
| 1662 | // reverse the array so we start with the storage this view is in |
|
| 1663 | // which is the most likely to contain the file we're looking for |
|
| 1664 | $mounts = array_reverse($mounts); |
|
| 1665 | foreach ($mounts as $mount) { |
|
| 1666 | /** |
|
| 1667 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 1668 | */ |
|
| 1669 | if ($mount->getStorage()) { |
|
| 1670 | $cache = $mount->getStorage()->getCache(); |
|
| 1671 | $internalPath = $cache->getPathById($id); |
|
| 1672 | if (is_string($internalPath)) { |
|
| 1673 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 1674 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 1675 | return $path; |
|
| 1676 | } |
|
| 1677 | } |
|
| 1678 | } |
|
| 1679 | } |
|
| 1680 | throw new NotFoundException(sprintf('File with id "%s" has not been found.', $id)); |
|
| 1681 | } |
|
| 1682 | ||