Click or drag to resize

IAssetFolderAssets Method


Retrieves a collection of the assets inside of the folder.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
IEnumerable<IAsset> Assets(
	out int count,
	int pageSize = -1,
	int startIndex = -1
)

Parameters

count
Type: SystemInt32
Total count of all child assets.
pageSize (Optional)
Type: SystemInt32
Number of entries to return. If not provided, returns all entries.
startIndex (Optional)
Type: SystemInt32
Starting index of entries. If not provided, starts from the first entry.

Return Value

Type: IEnumerableIAsset
Collection of child assets.
Examples
Example of removing all assets in a folder in a custom hook:
C#
var assetFolder = session.Site.AssetFolder("af/114");
int c;
foreach (var child in assetFolder.Assets(out c))
{
    assetFolder.RemoveAsset(child);
}
See Also