FileSystemItem.HasSubDirectories Property

Specifies whether a file system item (a directory) has subdirectories.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll


public bool HasSubDirectories { get; set; }

Property Value

Type Description

true, if a file system item has subdirectories; otherwise, false.


The following example illustrates how to use the IsDirectory and HasSubDirectories properties inside the GetItems(FileSystemLoadItemOptions) method. Refer to the FileManager - Binding to Entity Framework ORM online demo to see the whole code.

File system provider:

public IEnumerable<FileSystemItem> GetItems(FileSystemLoadItemOptions options) {
    int parentId = ParseKey(options.Directory.Key);
    var fileItems = GetDirectoryContents(parentId);
    var hasSubDirectoriesInfo = GetHasSubDirectoriesInfo(fileItems);

    var clientItemList = new List<FileSystemItem>();
    foreach(var item in fileItems) {
        var clientItem = new FileSystemItem {
            IsDirectory = item.IsDirectory,
        if(item.IsDirectory) {
            clientItem.HasSubDirectories = hasSubDirectoriesInfo.ContainsKey(item.Id) && hasSubDirectoriesInfo[item.Id];
    return clientItemList;


Online Demos

See Also