| @@ 162-166 (lines=5) @@ | ||
| 159 | ||
| 160 | /** @var SearchResult[] $nodes */ |
|
| 161 | $nodes = array_map(function (Node $node) { |
|
| 162 | if ($node instanceof Folder) { |
|
| 163 | $davNode = new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager); |
|
| 164 | } else { |
|
| 165 | $davNode = new \OCA\DAV\Connector\Sabre\File($this->view, $node, $this->shareManager); |
|
| 166 | } |
|
| 167 | $path = $this->getHrefForNode($node); |
|
| 168 | $this->tree->cacheNode($davNode, $path); |
|
| 169 | return new SearchResult($davNode, $path); |
|
| @@ 237-241 (lines=5) @@ | ||
| 234 | throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located'); |
|
| 235 | } |
|
| 236 | ||
| 237 | if ($info['mimetype'] === 'httpd/unix-directory') { |
|
| 238 | $node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree, $this->shareManager); |
|
| 239 | } else { |
|
| 240 | $node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info, $this->shareManager); |
|
| 241 | } |
|
| 242 | if ($this->tree) { |
|
| 243 | $this->tree->cacheNode($node); |
|
| 244 | } |
|