How to Determine the Size of a SharePoint List Programmatically

I have an SPList element in sharepoint, and I want to know the size on the list drive. Is it possible without going through each item in the list and trying to figure out the size?

Update

Below is the code that I think I can use if I need to get each element:

        long listSize = 0;
        foreach (SPListItem item in list.Items)
        {
            listSize += item.File.Length;
        }

Update

I think I will need to go through each element to determine the size. How would you recommend this? I need to get the file size, any data in the size of the fields and added versions.

+3
source share
1 answer

CAML . , DataTable.

CAML SharePoint.

: , CAML, , .

+2

Source: https://habr.com/ru/post/1732860/


All Articles