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

FileFolderExtensions.EnsureFolder Method

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

Ensure that the folder structure is created. This also ensures hierarchy of folders.

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

Syntax

public static Folder EnsureFolder(this Web web, Folder parentFolder, String folderPath, params Expression<Func<Folder, Object>>[] expressions)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Web to be processed - can be root web or sub site

parentFolder

  Type: Microsoft.SharePoint.Client.Folder
  Parent folder

folderPath

  Type: System.String
  Folder path

expressions

  Type: System.Linq.Expressions.Expression<System.Func<Microsoft.SharePoint.Client.Folder, System.Object>>[]
  List of lambda expressions of properties to load when retrieving the object

Return Value

Type: Folder
The folder structure

See also

© 2018 Microsoft