Export (0) Print
Expand All

SPListItem.FileSystemObjectType Property

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

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

[ClientCallablePropertyAttribute(SetProperty = false)]
[ClientCallableConstraintAttribute(FixedId = "filetype", Type = ClientCallableConstraintType.Custom, Value = "It MUST be either FileSystemObjectType.File or FileSystemObjectType.Folder")]
public SPFileSystemObjectType FileSystemObjectType { get; set; }

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.

Community Additions

ADD
Show:
© 2014 Microsoft