SPListItem.FileSystemObjectType property

Gets or sets the file system object type for the item.

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

'Declaration
Public Property FileSystemObjectType As SPFileSystemObjectType
	Get
	Set
'Usage
Dim instance As SPListItem
Dim value As SPFileSystemObjectType

value = instance.FileSystemObjectType

instance.FileSystemObjectType = value

Property value

Type: Microsoft.SharePoint.SPFileSystemObjectType
An enumeration value that indicates the type: file, folder, Web, or invalid.

ExceptionCondition
ArgumentException

You can set this property only for a new list item. The current item is not new; it has already been persisted in the database.

It is only valid to set this property on new SPListItem objects—that is, before the Update method is called for the first time and the item is persisted in the database.

Show: