There is no API to get the total size of a specific directory in the isolated storage. Therefore, the only alternative you have is to browse the files and manually compute the total size.

 Here is a sample implementation:

 

  long total = 0;

  using (var isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())

  {

     string folder = "folder/";

    foreach (var fileName in isolatedStorage.GetFileNames(folder))

    {

       using (var file = isolatedStorage.OpenFile(folder + fileName, FileMode.Open))

       {

          total += file.Length;

       }

      }

  }

  MessageBox.Show(total + " bytes");

相关文章:

  • 2021-09-01
  • 2022-12-23
  • 2021-07-29
  • 2021-10-19
  • 2021-12-08
  • 2021-07-20
  • 2022-01-19
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-09-28
相关资源
相似解决方案