Skip to content

Conversation

@joshtrichards
Copy link
Member

  • Resolves: #

Summary

  • Refactors constructor for a bit more clarity and explicitness
  • Refactors stat() for a bit more clarity
  • Minor optimization for the temporary storage unavailability check (directly use is_dir(realpath) vs loading up $this->stat unnecessarily)
  • Adds property typing
  • Adjusts property names for clarity/consistency
  • Adds docs
  • Calls out an IStorage contract issue: many/most Local methods may throw \OCP\Files\ForbiddenException even those usually expected to return, say, false under error circumstances.
    • Many of this should probably be caught internally IMO (e.g. in $this->stat()) or, at a minimum, contract updated since consumers are expected to handle these (mostly filename blacklisting and symbolic link resolution related)

Not expected to introduce any externally visible changes in behavior.

P.S. Labeled for External Storage + Filesystem, but obviously impacts all Local storage.

TODO

  • ...

Checklist

… property typing

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added feature: filesystem feature: external storage ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jan 4, 2026
Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: external storage feature: filesystem ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants