Hey everybody !
I have a terrible problem. I'm using the fileSystem plugin to write on a file, i'm able to append text without any problem, but the problem is when I want to delete a certain part of the file, I din't find anything to help me with.
I'm using a local json file to save some articles, pictures,..(whatever you want). Every time the user clicks on the favourite button, i'm writing into the file this way :
var len = fileWriter.length;
if(len===0) {
fileWriter.write('[{"id":"'+text+ '"}]');
}
else {
fileWriter.seek(len-1);
fileWriter.write(',{"id":"'+text+ '"}]');
}
But now, what i want to do is to be able to delete some id if the user doesn't want it anymore in his favourites.
Thank you for your help.