}, $folderContent);
}
- protected function createNode(string $path, ?FileInfo $info = null, bool $infoHasSubMountsIncluded = true): INode {
+ protected function createNode(string $path, ?FileInfo $info = null): INode {
if (is_null($info)) {
$isDir = $this->view->is_dir($path);
} else {
* @param int $id
* @return array
*/
- protected function getByIdInRootMount(int $id): array {
+ protected function getByIdInRootMount(int $id): array {
if (!method_exists($this->root, 'createNode')) {
// Always expected to be false. Being a method of Folder, this is
// always implemented. For it is an internal method and should not
}
$mount = $this->root->getMount('');
$storage = $mount->getStorage();
- $cacheEntry = $storage?->getCache($this->path)->get($id);
+ $cacheEntry = $storage ? $storage->getCache($this->path)->get($id) : null;
if (!$cacheEntry) {
return [];
}
* @param string $path
* @param FileInfo $fileInfo
*/
- public function __construct($root, $view, $path, $fileInfo = null, ?Node $parent = null) {
+ public function __construct(IRootFolder $root, $view, $path, $fileInfo = null, ?Node $parent = null) {
if (Filesystem::normalizePath($view->getRoot()) !== '/') {
throw new PreConditionNotMetException('The view passed to the node should not have any fake root set');
}
return $this->getFileInfo()->isCreatable();
}
- public function getParent(): INode|IRootFolder {
+ /**
+ * @return INode|IRootFolder
+ * @throws NotFoundException
+ */
+ public function getParent() {
if ($this->parent === null) {
$newPath = dirname($this->path);
if ($newPath === '' || $newPath === '.' || $newPath === '/') {
}
/**
+ * @return INode|IRootFolder
* @throws \OCP\Files\NotFoundException
*/
- public function getParent(): INode|IRootFolder {
+ public function getParent() {
throw new NotFoundException();
}