createFile

abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource): Call<RemoteFile>

Create a new file.

Same as calling createFile with null modifiedDate, listener and DEFAULT arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

folder

The RemoteFolder where you would like to create the file. Must not be null.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

Throws

on a null data argument.


abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource, uploadOptions: UploadOptions): Call<RemoteFile>

Create a new file.

Same as calling createFile with null modifiedDate and listener arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

folder

The RemoteFolder where you would like to create the file. Must not be null.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

uploadOptions

UploadOptions to be used for the file creation. Must not be null.

Throws

on a null uploadOptions argument.


abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener): Call<RemoteFile>

Create a new file.

Same as calling createFile with folderId taken from folderId and DEFAULT arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

folder

The RemoteFolder where you would like to create the file. Must not be null.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

modifiedDate

The last modification date to be used. If set to null, the upload date will be used instead.

listener

The listener to be used to notify about upload progress. If null, no progress will be reported.

Throws

on a null data argument.


abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener, uploadOptions: UploadOptions): Call<RemoteFile>

Create a new file.

Same as calling createFile with folderId taken from folderId.

Return

Call resulting in the new file's metadata

See also

Parameters

folder

The RemoteFolder where you would like to create the file. Must not be null.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

modifiedDate

The last modification date to be used. If set to null, the upload date will be used instead.

listener

The listener to be used to notify about upload progress. If null, no progress will be reported.

uploadOptions

UploadOptions to be used for the file creation. Must not be null.

Throws

on a null uploadOptions argument.


abstract fun createFile(folderId: Long, filename: String, data: DataSource): Call<RemoteFile>

Create a new file.

Same as calling createFile with null modifiedDate, listener and DEFAULT arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

folderId

The id of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

Throws

on a null data argument.


abstract fun createFile(folderId: Long, filename: String, data: DataSource, uploadOptions: UploadOptions): Call<RemoteFile>

Create a new file.

Same as calling createFile with null modifiedDate and listener arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

folderId

The id of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

uploadOptions

UploadOptions to be used for the file creation. Must not be null.

Throws

on a null uploadOptions argument.


abstract fun createFile(folderId: Long, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener): Call<RemoteFile>

Create a new file.

Creates a new file with the specified name in the specified folder.

If set, the modifiedDate parameter will be set as the last modification date of the file.

The provided DataSource object will be used to populate the file's contents.

If a ProgressListener is provided, it will be notified on every n bytes uploaded, as set per progressCallbackThreshold

Method is called with a DEFAULT argument.

To create an empty file, call the method with a EMPTY argument.

For more information, see the related documentation page.

Return

Call resulting in the new file's metadata

See also

Parameters

folderId

The id of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

modifiedDate

The last modification date to be used. If set to null, the upload date will be used instead.

listener

The listener to be used to notify about upload progress. If null, no progress will be reported.

Throws

on a null data argument.


abstract fun createFile(folderId: Long, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener, uploadOptions: UploadOptions): Call<RemoteFile>

Create a new file.

Creates a new file with the specified name in the specified folder.

If set, the modifiedDate parameter will be set as the last modification date of the file.

The provided DataSource object will be used to populate the file's contents.

If a ProgressListener is provided, it will be notified on every n bytes uploaded, as set per progressCallbackThreshold

Method uses the supplied UploadOptions, possible constant for usage are DEFAULT, OVERRIDE_FILE, PARTIAL_UPLOAD.

To create an empty file, call the method with a EMPTY argument.

For more information, see the related documentation page.

Return

Call resulting in the new file's metadata

See also

Parameters

folderId

The id of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

modifiedDate

The last modification date to be used. If set to null, the upload date will be used instead.

listener

The listener to be used to notify about upload progress. If null, no progress will be reported.

uploadOptions

UploadOptions to be used for the file creation. Must not be null.

Throws

on a null uploadOptions argument.


abstract fun createFile(path: String, filename: String, data: DataSource): Call<RemoteFile>

Create a new file.

Same as calling createFile with null modifiedDate, listener and DEFAULT arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

path

The path of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

Throws

on a null data argument.


abstract fun createFile(path: String, filename: String, data: DataSource, uploadOptions: UploadOptions): Call<RemoteFile>

Create a new file.

Same as calling createFile with null modifiedDate and listener arguments.

Return

Call resulting in the new file's metadata

See also

Parameters

path

The path of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

uploadOptions

UploadOptions to be used for the file creation. Must not be null.

Throws

on a null uploadOptions argument.


abstract fun createFile(path: String, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener): Call<RemoteFile>

Create a new file.

Creates a new file with the specified name in the specified folder.

If set, the modifiedDate parameter will be set as the last modification date of the file.

The provided DataSource object will be used to populate the file's contents.

If a ProgressListener is provided, it will be notified on every n bytes uploaded, as set per progressCallbackThreshold

Method is called with a DEFAULT argument.

To create an empty file, call the method with a EMPTY argument.

For more information, see the related documentation page.

Return

Call resulting in the new file's metadata

See also

Parameters

path

The path of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

modifiedDate

The last modification date to be used. If set to null, the upload date will be used instead.

listener

The listener to be used to notify about upload progress. If null, no progress will be reported.

Throws

on a null data argument.


abstract fun createFile(path: String, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener, uploadOptions: UploadOptions): Call<RemoteFile>

Create a new file.

Creates a new file with the specified name in the specified folder.

If set, the modifiedDate parameter will be set as the last modification date of the file.

The provided DataSource object will be used to populate the file's contents.

If a ProgressListener is provided, it will be notified on every n bytes uploaded, as set per progressCallbackThreshold

Method uses the supplied UploadOptions, possible constant for usage are DEFAULT, OVERRIDE_FILE, PARTIAL_UPLOAD.

To create an empty file, call the method with a EMPTY argument.

For more information, see the related documentation page.

Return

Call resulting in the new file's metadata

See also

Parameters

path

The path of the folder you would like to create the file.

filename

The file name. Must not be null.

data

DataSource object providing the file content. Must not be null.

modifiedDate

The last modification date to be used. If set to null, the upload date will be used instead.

listener

The listener to be used to notify about upload progress. If null, no progress will be reported.

uploadOptions

UploadOptions to be used for the file creation. Must not be null.

Throws

on a null uploadOptions argument.