Tab
A newer version of this page is available. Switch to the current version.

FileManagerFolder.GetFiles() Method

Returns an array of files that are located in the current folder.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public FileManagerFile[] GetFiles()

Returns

Type Description
FileManagerFile[]

An array of FileManagerFile objects.

Examples

The code below demonstrates how you can show information about folder contents in a label.

public string ItemsNumberToString(int count, string item) {
        if (count != 1) item = item + "s";
        return count.ToString() + " " + item;
}
protected void ASPxFileManager1_Load(object sender, EventArgs e) {
        int FileCount = ASPxFileManager1.SelectedFolder.GetFiles().Length;
        int FolderCount = ASPxFileManager1.SelectedFolder.GetFolders().Length;
        ASPxFileManager1.JSProperties["cpLabelText"] = "The " + ASPxFileManager1.SelectedFolder.Name + " folder contains " + ItemsNumberToString(FolderCount, "folder") + " and " + ItemsNumberToString(FileCount, "file");
}
See Also