How do I obtain the fully qualified path of an isolated storage file for a WPF application?
A:
You can use reflection to do so, as shown in the linked forum post:
IsolatedStorageFileStream oStream =
new IsolatedStorageFileStream(ISOLATED_FILE_NAME, FileMode.Create, isoStore);
// Get the physical path using reflection
String filePath = oStream.GetType().GetField("m_FullPath",
BindingFlags.Instance | BindingFlags.NonPublic).GetValue(oStream).ToString();
Console.WriteLine(filePath);
Oded
2010-09-23 18:37:56
Shouldn't it be possible to obtain the path using a Win32 call via the low-level handle?
Bob
2010-09-23 20:52:02
@Bob - you could probably `PInvoke` something like that, but I assumed you would be using managed code.
Oded
2010-09-23 20:53:30