Is there any way to access a SQLite database inside the Data directory in the add-on builder using add-on sdk v1.5?
this is the code that i am using:
var {Cc, Ci, Cu} = require("chrome");
var data = require('self').data;
// This is an active module of the pankajsingh5k Add-on
exports.main = function() {
var {Services} = Cu.import("resource://gre/modules/Services.jsm");
var {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
var file = FileUtils.getFile("Desk", "Helper.sqlite");
var mDBConn = Services.storage.openDatabase(file);
console.log('loading');
var statement = mDBConn.createStatement("SELECT * FROM Words");
right now FileUtils.getFile() is set to "Desk" which stands for Desktop. I dont know how i can access the sql lite file in the add on builder directory structure.