Closed Bug 1144871 Opened 10 years ago Closed 10 years ago

Improve FileAccessor API

Categories

(Firefox for iOS :: Data Storage, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(1 file)

47 bytes, text/x-github-pull-request
nalexander
: review+
Details | Review
There are several quirks with our FileAccessor/ProfileFileAccessor implementation: * basePath is an unnecessary (and unused) parameter in several methods, where we fall back to the profile directory. If we pass in another basePath, the operations won't even happen inside of the profile, which I'd argue shouldn't happen in ProfileFileAccessor. * Errors are swallowed up. We can forward NSErrorPointer so the caller decides what to do with it. * A number of methods have some unexpected side effects. For example, remove(), get(), and exists() will all create directories if the directory doesn't exist. We should keep this API as simple and straightforward as possible, and keep it well-documented. We don't want to end up with another Profile mess like we had on Android!
Attached file Pull request
Attachment #8579613 - Flags: review?(rnewman)
Attachment #8579613 - Flags: review?(nalexander)
Comment on attachment 8579613 [details] [review] Pull request Stream of consciousness comments on the PR, but this looks basically OK to me.
Attachment #8579613 - Flags: review?(rnewman)
Attachment #8579613 - Flags: review?(nalexander)
Attachment #8579613 - Flags: review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: