JavaPowUpload 1.0 control documentation
DownloadItem object provides a way to access individual files added to list. You cannot create DownloadItem object directly. You should obtain it by getFiles() method of an JavaPowUpload object.

DownloadItem object methods  



isFile method

getIndex method

isChecked method

setChecked method

getId method

getFilename method

getPath method

getFullPath method

getLength method

getMD5Hash method

getUrl method

getUncompress method

getDelete method


isFile

boolean isFile()

Description

Method returns true if item is file, false if folder.

Example

var isfile=JavaPowUpload.getFiles().get(0).isFile();



getIndex

long getIndex()

Description

Method returns 0-based index of item.

Example

var index=JavaPowUpload.getFiles().get(0).getIndex(); // index of first file at the list. Value should be 0.



isChecked

boolean isChecked()

Description

Method returns true if item is checked; otherwise false.

Example

var checked=JavaPowUpload.getFiles().get(0).isChecked();

 

setChecked

void setChecked(boolean newValue)

Description

Method checks or unckecks item.

Parameters

boolean newValue - True to set item checked, false to uncheck item.

Example

JavaPowUpload.getFiles().get(0).setChecked(false);

 

getId

String getId()

Description

Method returns the item id attribute.

Example

var id=JavaPowUpload.getFiles().get(0).getId();


getFilename

String getFilename()

Description

Method returns only name of file (without directories).

Example

var fileName=JavaPowUpload.getFiles().get(0).getFileName();

getPath

String getPath()

Description

Method returns the path of the item in tree without file name.

Example

var treePath=JavaPowUpload.getFiles().get(0).getPath();

 

getFullPath

String getFullPath()

Description

Method returns the full path of the item (included file name).

Example

var treeFullPath=JavaPowUpload.getFiles().get(0).getFullPath();

getLength

long getLength()

Description

Method returns file size, in bytes or 0 if file length not specified (and not delivered from server) .

Example

var length=JavaPowUpload.getFiles().get(0).getLength();

 

getMD5Hash

String getMD5Hash()

Description

Method returns string representation of file content MD5 hash or null if file was not downloaded.

Example

var md5=JavaPowUpload.getFiles().get(0).getMD5Hash();



getUrl

String getUrl()

Description

Method returns "url" attribute value.

Example

var url=JavaPowUpload.getFiles().get(0).getUrl();



getUncompress

boolean getUncompress()

Description

Method returns the "uncompress" attribute value. True, if the zip archive should be uncompressed when download complete.

Example

var uncompress=JavaPowUpload.getFiles().get(0).getUncompress();

 

getDelete

boolean getDelete()

Description

Method returns the "delete" attribute value. True, if the zip archive should be deleted after unpacking.

Example

var delete=JavaPowUpload.getFiles().get(0).getDelete();