All docs
V20.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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 folders.

Parameters:

The current files or folders.

destinationDirectory:

FileSystemItem

The directory where files or folders 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 folder 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 folders.

Parameters:

The current files or folders.

Return Value:

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

An array of Promise objects. A promise at N index gets resolved after a file or folder 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 folders.

Parameters:

The current files and folders.

destinationDirectory:

FileSystemItem

The directory where files or folders 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 folder with the same index is moved. It is a native Promise or a jQuery.Promise when you use jQuery.

renameItem()

Renames a file or folder.

Parameters:

The current file or folder.

newName:

String

The new name for the file or folder.

Return Value:

Promise<any> (jQuery or native)

A Promise that is resolved after the file or folder 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.