SPFolderHierarchy.GetSiteCollectionResourceFolder Method
Gets a folder for storing resources for a site collection.
Namespace: Microsoft.Office.Server.Utilities
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Shared Function GetSiteCollectionResourceFolder ( _
site As SPSite, _
strFolderName As String, _
fEnsure As Boolean _
) As SPFolder
'Usage
Dim site As SPSite
Dim strFolderName As String
Dim fEnsure As Boolean
Dim returnValue As SPFolder
returnValue = SPFolderHierarchy.GetSiteCollectionResourceFolder(site, _
strFolderName, fEnsure)
public static SPFolder GetSiteCollectionResourceFolder(
SPSite site,
string strFolderName,
bool fEnsure
)
Parameters
- site
Type: Microsoft.SharePoint.SPSite
The site collection.
- strFolderName
Type: System.String
The name of the folder.
- fEnsure
Type: System.Boolean
Whether to ensure its creation.
Return Value
Type: Microsoft.SharePoint.SPFolder
The retrieved or created folder.
Returns SPFolder.
Remarks
The returned folder is not contained in a list. It is a direct child of site.RootWeb.RootFolder.