Skip to main content

FileSystemCommandProcessor.Execute(FileSystemCommand, String) Method

Executes a command.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public FileSystemCommandResult Execute(
    FileSystemCommand command,
    string arguments
)

Parameters

Name Type Description
command FileSystemCommand

The command.

arguments String

The command arguments.

Returns

Type Description
FileSystemCommandResult

The command result.

Remarks

The arguments parameter contains information that depends on a file operation:

For example:

  • delete command - the parameter contains the deleted item’s FileItemPathInfo object.

  • rename command - the parameter contains the renamed item’s FileItemPathInfo object and the item’s new name.

Arguments come as an encoded string in JSON format.

The following example illustrates how to create a method that handles the File Manager operations.

API Controller:

public class FileManagerApiController : Controller {
    public object FileSystem(FileSystemCommand command, string arguments) {
        var processor = new FileSystemCommandProcessor(config);
        var result = processor.Execute(command, arguments);
        //...
    }
}

Concepts

Online Demo

Online Example

See Also