user584018
user584018

Reputation: 11304

not able to get files when there is more than one isolated storage folder

I have 2 isolated storage folder for my admin user,

enter image description here

In top folder I have a file which I want to grab. I'm using below code to calculate the path for Isolated Storage,

var path = IsolatedStorageFile.GetUserStoreForAssembly().GetType().GetField("m_RootDir", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(IsolatedStorageFile.GetUserStoreForAssembly()).ToString()

Now this will always give me path for bottom folder (picture above) whereas my file reside under top folder.

Is there other way to grab the path?

Upvotes: 0

Views: 40

Answers (1)

J. Liu
J. Liu

Reputation: 366

It is not a good idea to use reflection for getting files.
This document may be helpful : How to: Find Existing Files and Directories in Isolated Storage | Microsoft Docs

Upvotes: 2

Related Questions