Click or drag to resize

IAssetFolderCreateChildFolder Method


Creates a new child asset folder under the context asset folder.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax
IAssetFolder CreateChildFolder(
	string name,
	bool overwriteSameName
)

Parameters

name
Type: SystemString
Name of the new child asset folder to create.
overwriteSameName
Type: SystemBoolean
Whether an asset folder already existing within the context asset folder should be replaced with the new asset folder.

Return Value

Type: IAssetFolder
Newly created child asset folder.
Examples
Example of CreateChildFolder method in custom hook:
C#
int outVar;
IAssetFolder baseFolder = session.Site.AssetFolder("af/5");
foreach(IAssetFolder folder in baseFolder.DescendantFolders(out outVar)){
    folder.CreateChildFolder("Thumbnails", true)
}
See Also