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");

How to get Directory size in IsolatedStorage of Windows Phone 8 App的更多相关文章

  1. How to know the directory size in CENTOS 查看文件夹大小

    Under any linux system, you want to use the command du. (Disk Usage) Common usage is : du -sh file(s ...

  2. 格式化一个文件的大小(size),或者说是格式化一个app的大小(size)

    long number = 6243161; Formatter.formatFileSize(context, number): 需要导包,import android.text.format.Fo ...

  3. Windows Azure 配置Active Directory 主机(4)

    步骤 6:设置在启动时加入域的虚拟机 若要创建其他在首次启动时加入域的虚拟机,请打开 Windows Azure PowerShell ISE,粘贴以下脚本,将占位符替换为您自己的值并运行该脚本. 若 ...

  4. [UWP]涨姿势UWP源码——IsolatedStorage

    前一篇涨姿势UWP源码分析从数据源着手,解释了RSS feed的获取和解析,本篇则会就数据源的保存和读取进行举例. 和之前的Windows Runtime一样,UWP采用IsolatedStorage ...

  5. iPad 多任务 Spilt View & Size Class

    iPad 多任务 Spilt View & Size Class 一.多任务简介 iOS 9 以后iPad新增了多任务的支持,主要形式有三种: Slide Over (侧边快捷打开) Spil ...

  6. Compress a Folder/Directory via Perl5

    Compress a Folder/Directory via Perl5 tested in Windows, Mac OS X, Ubuntu16.04 #!/usr/bin/perl #压缩指定 ...

  7. Winbind authentication against active directory

    Winbind authentication against active directory Description This tip will describe how to configure ...

  8. Oracle Directory文件夹的知识

    在上一章介绍expdp/impdp时曾使用过DIRECTORY这个概念,以下再简单说明下DIRECTORY的点点滴滴. MOS上对DIRECTORY的解释(266875.1): (1).基于服务端 v ...

  9. Windows Server 2016-WinSer2016 Active Directory新增功能

    Windows Server 2016 Active Directory 域服务 (AD DS)新增很多功能用来提升Active Directory域及组织环境安全等,并帮助他们面向云的部署或混合部署 ...

随机推荐

  1. iOS-iPhone系统版本号-iPhone App版本号

    转载: http://blog.sina.com.cn/s/blog_7b9d64af0101bu9j.html 很多时候,我们需要获得用户iPhone版本号,或者App的当前版本号. 关心以下两个方 ...

  2. 找出数组前N大的数

    这个题也是个比较有名的面试题.当然有很多变种. 题目意思基本是:从一个数据量很大的数组里找前N大的元素.不允许排序. 这个题有两个比较好的思路: 思路一:用快速排序的思想,是思想,不是要排序; 思路二 ...

  3. SYNONYMS

    SQL> SELECT * FROM V$VERSION WHERE ROWNUM=1; BANNER --------------------------------------------- ...

  4. linux下lighttpdserver的具体安装步骤 以及对flv流媒体的支持配置

    准备条件: a,创建/usr/local/lighttpd文件夹,用于安装lighttpd b,创建lighttpd用户password为lighttpd账号,用于lighttpd的启动用户 c,安装 ...

  5. mysql.cnf 配制文件详解

    代码如下: [client]port = 3306socket = /tmp/mysql.sock [mysqld]port = 3306socket = /tmp/mysql.sock basedi ...

  6. linux监控程序

    IP内部地址: 方法一:ifconfig |grep 'inet addr'|grep '192.168.1' | awk '{print $2}'| tr -d "addr:" ...

  7. 轮播图-JavaScript

    轮播图一: <!doctype html> <html lang="en"> <head> <meta charset="UTF ...

  8. BULK INSERT将CSV或TXT文件导入到SQL Server

    CSV代表逗号分隔值,有时也被称为逗号分隔的值.而 如果加载txt文件,然后文件应该有逗号分隔的值.和文件应该是这样 下面是该脚本以创建表: CREATE TABLE Employee( Id int ...

  9. javascript实现可编辑的下拉框

    曾经遇到过一个需求的情况是这样的,我们提供给用户的输入框的可选择项只能满足用户的大部分情况的选择,但是有时候会遇到一些用户想要输入的数据是下拉项中所没有的,而用户不希望改变下拉项为输入框模式,需要说如 ...

  10. MySQL特殊语法---replace into

    MySQL中有这样的SQL语句 1. replace into tbl_name(col_name, ...) values(...) 2. replace into tbl_name(col_nam ...