SPFile.TotalLength property

Gets the size of the file in bytes, including the size of any Web Parts that are used in the file.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public long TotalLength { get; }

Property value

Type: System.Int64
A long integer that specifies the size of the file.

The value of the TotalLength property includes the sizes of the following:

  • Web Parts page .aspx file

  • Web Parts table row for each Web Part on the Web Parts page

  • Personalization table row for each Web Part Personalization

The value of this property does not include the size of class resources for Web Parts.

Show: