Skip to content

Conversation

@ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Sep 6, 2022

This is just a concept that will avoid recurvise parsing of all folder/files of a share by link (/shareinfo)

will returns hasChildren if more sub folder are available, but not parsed.
A second request include &startAt=<sub_folder_id will returns info about this sub foler within the share.

}

private function parseNode(Node $node, int $permissionMask) {
private function parseNode(Node $node, int $permissionMask, bool $recursive = true) {

Check notice

Code scanning / Psalm

MissingReturnType

Method OCA\Files_Sharing\Controller\ShareInfoController::parseNode does not have a return type
}
return $this->parseFolder($node, $permissionMask);

return $this->parseFolder($node, $permissionMask, $recursive);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 1 of OCA\Files_Sharing\Controller\ShareInfoController::parseFolder expects OCP\Files\Folder, parent type OCP\Files\Node provided
}

private function parseFolder(Folder $folder, int $permissionMask) {
private function parseFolder(Folder $folder, int $permissionMask, bool $recursive = true) {

Check notice

Code scanning / Psalm

MissingReturnType

Method OCA\Files_Sharing\Controller\ShareInfoController::parseFolder does not have a return type
try {
$new = $node;
foreach (explode('/', $subPath) as $subFolder) {
$new = $new->get($subFolder);

Check notice

Code scanning / Psalm

PossiblyUndefinedMethod

Method OCP\Files\Node::get does not exist
@icewind1991
Copy link
Member

In general I'm hesitant to patch up the ShareInfo since we no longer use it ourselves with #32852

@ArtificialOwl ArtificialOwl force-pushed the enh/noid/lazy-shareinfo branch from 3fd8249 to f55a613 Compare September 7, 2022 14:52
// checking all path that link to node_id set as $st
// will returns the node that fit current node full path
/** @var Node[] $subs */
$subs = $node->getById($startAt);

Check failure

Code scanning / Psalm

UndefinedInterfaceMethod

Method OCP\Files\Node::getById does not exist
@ArtificialOwl ArtificialOwl deleted the enh/noid/lazy-shareinfo branch September 12, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants