dineshthamburu
dineshthamburu

Reputation: 1151

How to get the isolated storage path for accessing the files and folders in windows phone7 application?

In windows mobile 6 applications, I use code like Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
to get the application path.

Likewise in windows phone7 application, how to get the isolated storage path and how to access the files and folders in my application?
Please give me a sample code for develop my application.

Upvotes: 2

Views: 5069

Answers (2)

StaWho
StaWho

Reputation: 2488

have a look here: Retrieving file path from IsolatedStorage

isoStore.GetType.GetField("m_RootDir", Reflection.BindingFlags.NonPublic).GetValue(isoStore).ToString();
                                       ^ or Reflection.BindingFlags.Instance

Upvotes: 2

Paul Annetts
Paul Annetts

Reputation: 9604

Just use IsolatedStorageFile.GetUserStoreForApplication() to get an object which can manipulate files and directories in Isolated Storage.

See this MSDN link which has plenty of example code.

Upvotes: 3

Related Questions