如何确定SharePoint中的SPListItem所占据空间的大小?

时间有限, 没找到确切描述这个问题的资料.

 

以下方法可以尝试, 当然是编写Object Model代码了.

 

1. 如果是SPListItem文档库的文档, 这个可以尝试.

SPListItem item;
int size = item.File.Length;

 

2. 我还尝试过估算Discussion Borad的List Item的大小. 这个SPListItem主要内容存储在XML中, 可以使用把xml转换成为Byte Array, 再统计大小.

 

其余的还没试过.

 

参考资料:

How do I determine the size of a SharePoint list Programmatically

http://stackoverflow.com/questions/2266548/how-do-i-determine-the-size-of-a-sharepoint-list-programmatically

posted on 2010-03-11 14:53  中道学友  阅读(302)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上