SPWeb.Folders Property

Gets the collection of all first-level folders in the website.

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

Syntax

'Declaration
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.NotNull)> _
<ClientCallableAttribute> _
Public ReadOnly Property Folders As SPFolderCollection
    Get
'Usage
Dim instance As SPWeb
Dim value As SPFolderCollection

value = instance.Folders
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.NotNull)]
[ClientCallableAttribute]
public SPFolderCollection Folders { get; }

Property Value

Type: Microsoft.SharePoint.SPFolderCollection
A collection of SPFolder objects that represents the subfolders of the website’s root folder.

Remarks

The user must have SPBasePermissions.BrowseDirectories permission in order to access the Folders property.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace

GetFolder()

RootFolder

SubFolders