diff options
author | Robin Appelman <robin@icewind.nl> | 2024-02-08 11:34:22 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-03-04 12:26:30 +0100 |
commit | 4d110c1dd6ae384c00c93b4e266118004b71e498 (patch) | |
tree | f2a27509dd6d9b9094e062d69664568f156cd3a0 /lib/private/Files/Node/LazyRoot.php | |
parent | 2c9761c73ad1ea51f13103819637fbd315806761 (diff) | |
download | nextcloud-server-4d110c1dd6ae384c00c93b4e266118004b71e498.tar.gz nextcloud-server-4d110c1dd6ae384c00c93b4e266118004b71e498.zip |
feat: add interface to get only a single node by id instead of all nodes for the id
this should be enough in most(?) cases and makes efficient implementation and caching easier
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Node/LazyRoot.php')
-rw-r--r-- | lib/private/Files/Node/LazyRoot.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Files/Node/LazyRoot.php b/lib/private/Files/Node/LazyRoot.php index 680e80cb45e..dd1596319fa 100644 --- a/lib/private/Files/Node/LazyRoot.php +++ b/lib/private/Files/Node/LazyRoot.php @@ -25,6 +25,7 @@ namespace OC\Files\Node; use OCP\Files\Cache\ICacheEntry; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; +use OCP\Files\Node; use OCP\Files\Node as INode; /** @@ -56,6 +57,10 @@ class LazyRoot extends LazyFolder implements IRootFolder { return $this->__call(__FUNCTION__, func_get_args()); } + public function getFirstNodeByIdInPath(int $id, string $path): ?Node { + return $this->__call(__FUNCTION__, func_get_args()); + } + public function getNodeFromCacheEntryAndMount(ICacheEntry $cacheEntry, IMountPoint $mountPoint): INode { return $this->getRootFolder()->getNodeFromCacheEntryAndMount($cacheEntry, $mountPoint); } |