Search code examples
c#windows-phone-7isolatedstorage

Is there a way to find out how much space in isolated storage you app is using on WP7?


I want to know how many kilobytes/megabytes of isolated storage my app is using on Windows Phone 7. Is there a simple way to find this out?


Solution

  • IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
    long usedBytes = isf.Quota - isf.AvailableFreeSpace;
    

    Documentation here: http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefile(v=VS.96).aspx