astian 0 Newbie Poster

I am sorry if I havent found if there is an obvious solution to my problem or if there is an answer to my question, I promise I looked and searched a lot, all my findings explain the apache cordova file api,but do not resolve my problem. And here it is:

As far as I am aware of, when using apache cordova's file API to read and write files, because accessing files from a browser is a huge security problem, you are given a sandboxed directory to use just and only for your application. Therefore, after reading the cordova documentation I've successfully written and read files from the application. The thing is, that when I FIRST write a file and then read it ... all is ok, it works, however I need to do something a little bit different. MY application is a very simple one, but I need to use a file that I have created during or before the installation (if that is possible). What I mean is, will try to put it into context, imagine that I have a ... application that opens books. They are simple text files, but I need to have them when the installation of the app is complete. I am unable to find a way, to configure the application in a way, or by some other means, accomplish the idea to have a file already present in the application sandboxed directory. Simplified, lets forget about the books analogy, I just need a file to be there after the installation of the application, something like a custom configuration file, that will be used by my application. As I am really new to the apache cordova and mobile development as a whole, I realize that it is possible that there probably are different ways to achieve my goal, but I am unfamiliar with any of them. I hope I was able to explain my situation clearly. Help will be appreciated

Ou, btw I implemented the simple solution in the cordova documentation that shows me what files and folders are inside the fileSystem.root directory that the api returns as the directory you can use, so they are : debugOutput.txt DeviceID.txt Microsoft Shared - as you can see Im using wp8 as platform

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.