Object

The Object file system provider works with a file system represented by an in-memory array of JSON objects.

Export: default
Type:

Object

Assign the array to the data option. Data object fields should have conventional names listed in the data description. Otherwise, specify [fieldName]Expr options: nameExpr, sizeExpr, dateModifiedExpr, and so on.

The following code shows how to bind the FileManager to the Object file system provider:

jQuery
index.js
$(function() {
    $("#fileManagerContainer").dxFileManager({
        fileSystemProvider: new DevExpress.fileManagement.ObjectFileSystemProvider({            
            data: [ 
                // ...
                // Data objects that represent files and directories
                // ...
            ],
            thumbnailExpr: "icon",
            // ...
        })
        // A shortcut that can be used if object fields have conventional names
        fileSystemProvider: [ 
            // ...
            // Data objects that represent files and directories
            // ...
        ]
    });
});

View Demo

Configuration

This section describes options that configure the Object file system provider.

Name Description
contentExpr

Specifies which data field provides information about files content.

data

Specifies an array of data objects that represent files and directories.

dateModifiedExpr

Specifies which data field provides timestamps that indicate when a file was last modified.

isDirectoryExpr

Specifies which data field provides information about whether a file system item is a directory.

itemsExpr

Specifies which data field provides information about nested files and directories.

keyExpr

Specifies the data field that provides keys.

nameExpr

Specifies which data field provides file and directory names.

sizeExpr

Specifies which data field provides file sizes.

thumbnailExpr

Specifies which data field provides icons to be used as thumbnails.

Methods

This section describes members used to manage file system items.

Name Description
abortFileUpload()

Cancels the file upload.

copyItems()

Copies files or folders.

createDirectory()

Creates a directory.

deleteItems()

Deletes files or folders.

downloadItems()

Downloads files.

getItems()

Gets file system items.

getItemsContent()

Gets items content.

moveItems()

Moves files and folders.

renameItem()

Renames a file or folder.

uploadFileChunk()

Uploads a file in chunks.