SPUtility.CreateParentFoldersForFile method
SharePoint 2013
Creates a folder hierarchy necessary to create a list item, including the list in which to create the item, as well as an indication whether to create additional list items that correspond to the folders.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public static void CreateParentFoldersForFile( SPList list, string url, bool createAsListItem )
Parameters
- list
- Type: Microsoft.SharePoint.SPList
The list in which the item is to be created.
- url
- Type: System.String
The URL of the list item to be created.
- createAsListItem
- Type: System.Boolean
true to create list items that correspond to the folders; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentException | list is null. |