SPWeb.GetFolder Method (String)

Returns the folder object that is located at the specified URL.

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

Syntax

Public Function GetFolder ( _
    strUrl As String _
) As SPFolder

Dim instance As SPWeb
Dim strUrl As String
Dim returnValue As SPFolder

returnValue = instance.GetFolder(strUrl)
public SPFolder GetFolder(
    string strUrl
)

Parameters

  • strUrl
    Type: System.String
    A string that contains the URL for the folder.

Return Value

Type: Microsoft.SharePoint.SPFolder
An SPFolder object that represents the folder.

Remarks

The user must have Browse Directories permissions to run code that uses the GetFolder method.

See Also

Reference

SPWeb Class

SPWeb Members

GetFolder Overload

Microsoft.SharePoint Namespace