public static class TdApi.DownloadFile extends TdApi.Function<TdApi.File>
Returns File
| Modifier and Type | Field and Description |
|---|---|
static int |
CONSTRUCTOR
Identifier uniquely determining type of the object.
|
int |
fileId
Identifier of the file to download.
|
long |
limit
Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.
|
long |
offset
The starting position from which the file needs to be downloaded.
|
int |
priority
Priority of the download (1-32).
|
boolean |
synchronous
Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started.
|
| Constructor and Description |
|---|
DownloadFile()
Default constructor for a function, which downloads a file from the cloud.
|
DownloadFile(int fileId,
int priority,
long offset,
long limit,
boolean synchronous)
Creates a function, which downloads a file from the cloud.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConstructor()
Returns an identifier uniquely determining type of the object.
|
toStringpublic int fileId
public int priority
public long offset
public long limit
public boolean synchronous
public static final int CONSTRUCTOR
public DownloadFile()
Returns File
public DownloadFile(int fileId,
int priority,
long offset,
long limit,
boolean synchronous)
Returns File
fileId - Identifier of the file to download.priority - Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.offset - The starting position from which the file needs to be downloaded.limit - Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.synchronous - Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started.public int getConstructor()
TdApi.ObjectgetConstructor in class TdApi.Object