Documentation > CMS Template API Library > Asset > GetFileList(AssetParams)

GetFileList

Gets a list of files in this folder.

public List<Asset> GetFileList(AssetParams)


Returns

The list of files.

Parameters

NameDescriptionType
assetParams The parameters used to filter the returned results. set ExcludeProjectTypes to false on Params object if you want new project related types to be returned. CrownPeak.CMSAPI.AssetParams

Code Example

C#

Sample:
Asset folderAsset = Asset.Load("/Site");
AssetParams aParams = new AssetParams();
aParams.Limit = 10;
List<Asset> files = folderAsset.GetFileList(aParams);


// Load All files that are not in archived or retired states
AssetParams aParams = new AssetParams();
aParams.ExcludeFilterStatus = Util.MakeList("Archived","Retired");
List<Asset> files = folderAsset.GetFileList(aParams);

Connect with Crownpeak