Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IFileSystemItemEditor.CreateDirectory(FileSystemCreateDirectoryOptions) Method

Creates a directory.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll

#Declaration

C#
void CreateDirectory(
    FileSystemCreateDirectoryOptions options
)

#Parameters

Name Type Description
options FileSystemCreateDirectoryOptions

Options related to the operation.

#Remarks

The following example illustrates how to overwrite the CreateDirectory method.

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

IFileSystemItemEditor interface:

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
    };
    // ...
}
See Also