pnpcore icon indicating copy to clipboard operation
pnpcore copied to clipboard

Allow for requesting data in IFolder.EnsureFolder

Open DanTm99 opened this issue 1 year ago • 0 comments

Category

  • [x] Feature request

Describe the feature

IFolder.EnsureFolder (and EnsureFolderAsync) currently does not support taking an expressions parameter like methods like IWeb.GetFolderByServerRelativeUrl do. This means if the folder exists, data for the returned IFolder cannot be requested, requiring an additional API call.

Describe the solution you'd like

Add an overload for (or update the existing functions) IFolder.EnsureFolder (and EnsureFolderAsync) that also takes params Expression<Func<IFolder, object>>[] expressions. This should then be passed to the GetFolderByServerRelativeUrl call in the last iteration of the foreach, so that the final folder returned has the requested data.

DanTm99 avatar Aug 07 '24 15:08 DanTm99