rootFolder->getMountPoint()->getNumericStorageId(); } public function getOrganizationFolderNode(OrganizationFolder $organizationFolder): ?Folder { return $this->getOrganizationFolderNodeById($organizationFolder->getId()); } /** Get underlying groupfolder folder node for the organization folder * (or if it was never before used create it in the filesystem and filecache!) */ public function getOrganizationFolderNodeById(int $id)/*: ?Folder*/ { return $this->mountProvider->getFolder(id: $id, create: True); } public function getOrganizationFolderSubfolder(OrganizationFolder $organizationFolder, array $path) { return $this->getOrganizationFolderByIdSubfolder($organizationFolder->getId(), $path); } public function getOrganizationFolderByIdSubfolder(int $id, array $path): ?Folder { $organizationFolderNode = $this->getOrganizationFolderNodeById($id); $currentFolder = $organizationFolderNode; foreach($path as $subfolder) { try { $currentFolder = $currentFolder->get($subfolder); } catch (\OCP\Files\NotFoundException $e) { return null; } } return $currentFolder; } }