Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IsolatedStorageFile or Windows.Storage APIs for Windows Phone 8?

I'm working on a behind-the-scenes library for Windows Phone 8. We need to use the filesystem as a crude cache. I've found that there are two APIs for Windows Phone 8 though. There is the typical IsolatedStorageFile API that was carried over from Windows Phone 7. However, there is also now the new Windows.Storage.ApplicationData set of APIs which I assume are carried from WinRT.

Which one should I use? What are the differences and why should I use one or the other? Also, how do they interact? If I create a file in IsolatedStorage, can I see it in Windows.Storage?

like image 638
Earlz Avatar asked Mar 25 '13 18:03

Earlz


1 Answers

If you're only targeting WP8 then, the advice I've received from Microsoft is, you should use the Windows.Storage APIs.

The expectation is that the others will be deprecated in future.

The guidance was actually more general. To paraphrase:

Where there are multiple ways of doing something, if you don't need backwards support, use the functionality under the "Windows" namespace.

like image 105
Matt Lacey Avatar answered Oct 24 '22 18:10

Matt Lacey