PhysicalFileSystemProvider.GetItems(FileSystemLoadItemOptions) Method

Gets file system items.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll


public virtual IEnumerable<FileSystemItem> GetItems(
    FileSystemLoadItemOptions options


Name Type Description
options FileSystemLoadItemOptions

Options related to the operation.


Type Description

A collection of file system items.


The following example illustrates how to overwrite the GetItems method.

Refer to the Binding to Entity Framework ORM online demo to get the whole example code.

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 {
            Key = item.Id.ToString(),
            Name = item.Name,
            IsDirectory = item.IsDirectory,
            DateModified = item.Modified
        if(item.IsDirectory) {
            clientItem.HasSubDirectories = hasSubDirectoriesInfo.ContainsKey(item.Id) && hasSubDirectoriesInfo[item.Id];
    return clientItemList;
See Also