In blackberry OS 6, the getFile method in the below case calls errorCallback (instead of the successCallback) and returns the error code 1 (which I believe is FileError.NOT_FOUND_ERR). This works in windows phone 7, iOS, and Android.
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
fileSystem.root.getFile('accountinfo.txt', { create: true }, function (fileEntry) {
fileEntry.createWriter(function (writer) {
writer.onwrite = function (event) {
};
writer.write(JSON.stringify(jsonObject));
},
function (error) {
alert(target + ' - CreateWriter: ' + error.code);
});
},
function (error) {
alert(target + ' - GetFile: ' + error.code);
});
},
function (error) {
alert(target + ' - Request: ' + error.code);
});
Here are the contents of the fileSystem.root property in JSON format:
{"isFile":false,"isDirectory":true,"name":"","fullPath":"file;///store","filesystem":null}
Please help!
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
fileSystem.root.getFile('accountinfo.txt', { create: true }, function (fileEntry) {
fileEntry.createWriter(function (writer) {
writer.onwrite = function (event) {
};
writer.write(JSON.stringify(jsonObject));
},
function (error) {
alert(target + ' - CreateWriter: ' + error.code);
});
},
function (error) {
alert(target + ' - GetFile: ' + error.code);
});
},
function (error) {
alert(target + ' - Request: ' + error.code);
});
Here are the contents of the fileSystem.root property in JSON format:
{"isFile":false,"isDirectory":true,"name":"","fullPath":"file;///store","filesystem":null}
Please help!


