docs(api): clarify getNumericStorageId return value in IMountPoint interface#57110
Open
joshtrichards wants to merge 3 commits intomasterfrom
Open
docs(api): clarify getNumericStorageId return value in IMountPoint interface#57110joshtrichards wants to merge 3 commits intomasterfrom
joshtrichards wants to merge 3 commits intomasterfrom
Conversation
…terface This updates the IMountPoint interface documentation to specify that getNumericStorageId returns -1 if the storage is unavailable, not null, aligning docs with actual implementations. Also aligned documentation language and improved clarity throughout the interface. Signed-off-by: Josh <josh.t.richards@gmail.com>
Added additional details to the return annotation for clarity. Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Comment on lines
37
to
44
| /** | ||
| * Returns the storage backend mounted at this point. | ||
| * | ||
| * Result may be memoized for subsequent calls. | ||
| * | ||
| * @return \OCP\Files\Storage\IStorage|null The mounted storage backend, or null if initialization failed. | ||
| * @since 8.0.0 | ||
| */ |
Member
There was a problem hiding this comment.
There already is a comment on this method, please replace it instead of adding another one.
| * This integer ID is more efficient for database operations and lookups compared | ||
| * to the string-based storage ID. | ||
| * | ||
| * @return int Numeric storage identifier, or -1 if storage cannot be initialized |
Member
There was a problem hiding this comment.
You could make the type -1|positive-int
| * This is the unique id (from the file cache) of the root entry for the storage mounted at this point. | ||
| * Returns -1 if the storage is not available or has not been scanned yet. | ||
| * | ||
| * @return int File id of the root folder, or -1 if unavailable. |
| * with string keys and mixed values. | ||
| * | ||
| * @return array | ||
| * @return array Associative array of mount options (may be empty) |
Member
There was a problem hiding this comment.
I think this could be array<string, mixed>.
| * such as in the case of temporary or system mounts. | ||
| * | ||
| * @return int|null mount id or null if not applicable | ||
| * @return int|null Mount point id, or null if not applicable. |
| * The mount provider is the service or class that created and manages this mount | ||
| * (for example, a class handling user homes, external storage, or shared mounts). | ||
| * | ||
| * @return string Fully-qualified class name of the provider, or empty string if the provider is not set. |
Member
There was a problem hiding this comment.
class-string<\OCP\Files\Config\IMountProvider>
CarlSchwan
reviewed
Dec 23, 2025
Comment on lines
+49
to
+50
| * @return int The numeric storage ID from the oc_storages table, | ||
| * or -1 if the storage is unavailable or failed. |
Member
There was a problem hiding this comment.
Suggested change
| * @return int The numeric storage ID from the oc_storages table, | |
| * or -1 if the storage is unavailable or failed. | |
| * @return -1|positive-int The numeric storage ID from the oc_storages table, | |
| * or -1 if the storage is unavailable or failed. |
Merged
This was referenced Jan 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This updates the IMountPoint interface documentation to specify that getNumericStorageId returns -1 if the storage is unavailable, not null, aligning docs with actual implementations.
Also aligned documentation language and improved clarity throughout the interface.
Found while doing some refactoring for groupfolders.
TODO
Checklist
3. to review, feature component)stable32)