Add-ons/dataDirectory: Difference between revisions

m
Line 1: Line 1:
= Addon Data Directory =
= Addon Data Directory =


Addons may want to store settings or other data on the local computer.  In the past, add-ons would use preferences or an arbitrary location on the user's filesystem.  [https://bugzilla.mozilla.org/show_bug.cgi?id=872980 Preferences are less than ideal], so each Addon object should provide built-in helpers to access a directory specific to it.  Then the addon's internal code can refer to the filesystem in a common location.
Addons may want to store settings or other data on the local computer.  In the past, add-ons would use preferences or an arbitrary location on the user's filesystem.  [https://bugzilla.mozilla.org/show_bug.cgi?id=872980 Preferences are less than ideal], so each Addon object should provide built-in helpers to read and write data specific to the Addon.


== Option 1:  Direct access to a nsIFile object ==
== Option 1:  Direct access to a nsIFile object ==
Confirmed users
146

edits