Skip to main content

IFileSystemItemEditor Interface

Provides APIs to edit file system items.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public interface IFileSystemItemEditor

Remarks

Assign a custom class that implements the IFileSystemItemEditor interface to the FileSystemProvider property to enable a custom file system provider to edit file system items.

Controller:

public object FileSystem(FileSystemCommand command, string arguments) {
    var config = new FileSystemConfiguration {
        FileSystemProvider = MyFileSystemProvider,
        //...
    }
}

Provider:

public class MyFileSystemProvider : IFileSystemItemEditor {
    //...
    public void CreateDirectory(FileSystemCreateDirectoryOptions options) {
        var parentDirectory = options.ParentDirectory;
        var directory = new FileItem {
            Name = options.DirectoryName,
            Modified = DateTime.Now,
            Created = DateTime.Now,
            IsDirectory = true,
            ParentId = ParseKey(parentDirectory.Key),
            ModifiedById = GuestPersonId
        };
        //...
    }
}

Concepts

Online Demos

See Also