Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete an isolated storage file

I know this may sound extremely nooby, so sorry in advance but I am learning and I have spent nearly 2 hours trying to find out how to do this now with no result...

I'm wondering how I would go about deleting a specific file from isolated storage in windows phone 7.

Thanks in advance!

like image 954
Jamie Avatar asked Nov 16 '10 21:11

Jamie


2 Answers

Simply call IsolatedStorageFile.DeleteFile.

For example:

IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication();
storage.DeleteFile("backup.bak");
like image 55
Jon Skeet Avatar answered Sep 20 '22 06:09

Jon Skeet


Use IsolatedStorageFile.DeleteFile.

using(var store = IsolatedStorageFile.GetUserStoreForApplication())
    store.DeleteFile("path.txt");
like image 41
driis Avatar answered Sep 20 '22 06:09

driis