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
)
Function RemoveFolder (
childFolder As IAssetFolder
) As Boolean
bool RemoveFolder(
IAssetFolder^ childFolder
)
abstract RemoveFolder :
childFolder : IAssetFolder -> bool
Parameters
- childFolder
- Type: Ingeniux.CMSIAssetFolder
The child Asset Folder to be removed.
Return Value
Type:
BooleanTrue if the child asset folder is successfully removed, false otherwise.
Examples
Example of RemoveFolder method in custom hook:
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