Click or drag to resize

IAssetFolderRemoveChildren Method


Removes all descendant assets and asset folders from the context asset folder.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
void RemoveChildren()

Return Value

Type: 
True if the children were successfully removed, false otherwise.
Examples
Example of RemoveChildren method in custom hook:
C#
int outVar;
foreach(IAssetFolder folder in session.Site.AssetFolder("af/5").DescendantFolders(out outVar).Where(f => f.Name == "Empty")){
    folder.RemoveChildren();
}
See Also