Question

I want to supply a bunch of files with my Windows Phone 8.1 app which are necessary for running the application. I searched on the net and found that this page. But I don't know which place in particular is the ApplicationData.Current folder. What I want is the following:-

  1. Can I create a folder called Resources or use the existing Assets folder in my Project tree and save the files in there.

  2. If yes, then how can I access that folder from within my App i.e. how can I open and close files in that Directory(relative or absolute addressing format to be used)? If you can provide a one or two line code for this, it would be great.

  3. Do I have to use the ReadTextAsync method to read the entire text of the file into a string or are there any other methods.(The System.IO.File.ReadAllText() method is not accessible when creating Windows 8.1 Phone app).

Thanks in advance.

Was it helpful?

Solution

Your App is installed on SD or Phone, depending on user Settings on the Phone. You can't normally access those files eg. by browsing files while Phone is connected to computer - the apps are Isolated.

Depending on your App:

Although you can't access files inside your App from outside the App, from WP8.1 you have access (read/write) to SD Card and other KnownFolders.

EDIT - you can also access your files by using Uri schemes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top