SPListItem.FileSystemObjectType property

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

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

Syntax

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

value = instance.FileSystemObjectType

instance.FileSystemObjectType = value
public SPFileSystemObjectType FileSystemObjectType { get; set; }

Property value

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

Exceptions

Exception Condition
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.

Remarks

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.

See also

Reference

SPListItem class

SPListItem members

Microsoft.SharePoint namespace