Say I'm writing a Firefox extension/add-on and I've got some user data stored in a file (XML or RDF format) in the user's profile directory. I want to use that data as a datasource for a XUL template. Is there a way to refer to the file in a safe, cross-platform manner?
My only idea so far, based on all the reading I've done, is to start with an "rdf:null" datasource in the XUL and replace the datasources
attribute in the code, after using the FileUtils to get the path to the profile directory. Is this the only way?