Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs for Folder.get and call for Folder.nodeExists #48455

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Sep 30, 2024

  • Resolves: Incomplete documentation for Folder.get

Summary

The main implemention already documents it, now the interface does as well. The other OCP/Files/Folder implementations (Folder, LazyFolder) wrap IRootFolder and therefore will throw as well.

/**
* @param string $path
* @return Node
* @throws \OCP\Files\NotPermittedException
* @throws \OCP\Files\NotFoundException
*/
public function get($path) {
$path = $this->normalizePath($path);
if ($this->isValidPath($path)) {
$fullPath = $this->getFullPath($path);
$fileInfo = $this->view->getFileInfo($fullPath, false);
if ($fileInfo) {
return $this->createNode($fullPath, $fileInfo, false);
} else {
throw new NotFoundException($path);
}
} else {
throw new NotPermittedException();
}

TODO

  • ...

Checklist

@kesselb kesselb added this to the Nextcloud 31 milestone Sep 30, 2024
@kesselb kesselb added the 2. developing Work in progress label Sep 30, 2024
@kesselb kesselb self-assigned this Sep 30, 2024
@kesselb kesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 30, 2024
@kesselb kesselb marked this pull request as ready for review September 30, 2024 12:09
@kesselb kesselb force-pushed the update-phpdoc-for-folder-get branch 2 times, most recently from 0d66eff to 1287d3a Compare September 30, 2024 16:25
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb merged commit 99d507c into master Sep 30, 2024
173 checks passed
@kesselb kesselb deleted the update-phpdoc-for-folder-get branch September 30, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants