Table of contents
TOC
Collapse the table of content
Expand the table of content

FileFolderExtensions.CreateFolder Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Creates a folder with the given name as a child of the Web. Note it is more common to create folders within an existing Folder, such as the RootFolder of a List.

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static Folder CreateFolder(this Web web, String folderName)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Web to check for the named folder

folderName

  Type: System.String
  Folder name to retrieve or create

Return Value

Type: Folder
The newly created Folder, so that additional operations (such as setting properties) can be done.

Remarks

Note that this only checks one level of folder (the Folders collection) and cannot accept a name with path characters.

See also

© 2018 Microsoft