FileManagerFolder.GetFolders() Method
Returns an array of folders, that are located in the current folder.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
NuGet Package: DevExpress.Web
Declaration
Returns
Type | Description |
---|---|
FileManagerFolder[] | An array of FileManagerFolder objects. |
Example
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");
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetFolders() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
See Also