All docs
V24.2
24.2
24.1
23.2
23.1
22.2
22.1
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 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.

JavaScript/jQuery FileManager - Object.Methods

This section describes members used to manage file system items.

abortFileUpload()

Cancels the file upload.

Parameters:
fileData:

File

The file that is being uploaded.

uploadInfo:

UploadInfo

Information about the file upload session.

destinationDirectory:

FileSystemItem

The directory where a file system item is uploaded to.

Return Value:

Promise<any> (jQuery or native)

A Promise that is resolved after the file upload is aborted. It is a native Promise or a jQuery.Promise when you use jQuery.

copyItems()

Copies files or directories.

Parameters:

The current files or directories.

destinationDirectory:

FileSystemItem

The directory where files or directories are copied to.

Return Value:

Array<Promise<any> (jQuery or native)>

An array of Promise objects. A promise at N index gets resolved after a file or directory with the same index is copied. It is a native Promise or a jQuery.Promise when you use jQuery.

createDirectory()

Creates a directory.

Parameters:
parentDirectory:

FileSystemItem

The parent directory where a new directory should be created.

name:

String

The name of the new directory.

Return Value:

Promise<any> (jQuery or native)

A Promise that is resolved after a new directory is created. It is a native Promise or a jQuery.Promise when you use jQuery.

deleteItems()

Deletes files or directories.

Parameters:

The current files or directories.

Return Value:

Array<Promise<any> (jQuery or native)>

An array of Promise objects. A promise at N index gets resolved after a file or directory with the same index is deleted. It is a native Promise or a jQuery.Promise when you use jQuery.

downloadItems()

Downloads files.

Parameters:

An array of files.

getItems()

Gets file system items.

Parameters:
parentDirectory:

FileSystemItem

The directory that stores file system items.

Return Value:

Promise<Array<FileSystemItem>> (jQuery or native)

A Promise that is resolved after file system items are obtained. It is a native Promise or a jQuery.Promise when you use jQuery.

getItemsContent()

Gets items content.

Parameters:

The file system items.

Return Value:

Promise<Object> (jQuery or native)

A Promise that is resolved after the content of the file system items is obtained. It is a native Promise or a jQuery.Promise when you use jQuery.

moveItems()

Moves files and directories.

Parameters:

The current files and directories.

destinationDirectory:

FileSystemItem

The directory where files or directories are moved to.

Return Value:

Array<Promise<any> (jQuery or native)>

An array of Promise objects. A promise at N index gets resolved after a file or directory with the same index is moved. It is a native Promise or a jQuery.Promise when you use jQuery.

renameItem()

Renames a file or directory.

Parameters:

The current file or directory.

newName:

String

The new name for the file or directory.

Return Value:

Promise<any> (jQuery or native)

A Promise that is resolved after the file or directory is renamed. It is a native Promise or a jQuery.Promise when you use jQuery.

uploadFileChunk()

Uploads a file in chunks.

Parameters:
fileData:

File

The file that is being uploaded.

uploadInfo:

UploadInfo

Information about the file upload session.

destinationDirectory:

FileSystemItem

The directory where the file is uploaded to.

Return Value:

Promise<any> (jQuery or native)

A Promise that is resolved after the file uploaded. It is a native Promise or a jQuery.Promise when you use jQuery.