Click or drag to resize

IAssetFolderRemoveFolder Method


Removes a specified child asset folder from within a context asset folder.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
bool RemoveFolder(
	IAssetFolder childFolder
)

Parameters

childFolder
Type: Ingeniux.CMSIAssetFolder
The child Asset Folder to be removed.

Return Value

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