All docs
V19.2
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

jQuery FileManager - Array

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

import ArrayFileProvider from "devextreme/ui/file_manager/file_provider/array"
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 Array file provider:

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

View Demo

Configuration

This section describes options that configure the Array file provider.

Name Description
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
getItemContent()

Gets the specified items' content.