I am trying to write some text file into isolated storage in WP7 through silverlight code. I want to somehow retrieve the file later and save onto PC. How do I see and get it? Is there some kind of file explorer? Where does it really saved to?
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
store.CreateDirectory("MyOutput");
using (var stream = new IsolatedStorageFileStream("MyOutput\\data.txt",
FileMode.OpenOrCreate,
FileAccess.Write,
store))
Another option is to use the Isolated Storage Explorer Tool (
ISETool.exe) which comes with the 7.1 SDK. It’s a command line driven tool available inC:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\(C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerToolon a 64 bit machine). To interact with your application’s Isolated Storage you need to specify if it should connect to a physical device or the emulator as well as the product ID (The GUID specified in your WMAppManifest.xml file). Eg. To download all the files from your emulator toC:\Foo\you’d use;Run
ISEToolwithout arguments to get help on its exact usage.tshere stands for “Take Snapshot”, other options arers(Restore Snapshot) anddir(list contents).xdis “Emulator” anddeis “Device”.Once you’ve ran this you can navigate to
C:\Fooand see the exact contents of the Isolated Storage for your application.It takes a bit more fiddling than the wp7explorer tool but doesn’t require you to link to an assembly or make any code modifications.