DownloadItem object methods
boolean isFile()
Method returns true if item is file, false if folder.
var isfile=JavaPowUpload.getFiles().get(0).isFile();
long getIndex()
Method returns 0-based index of item.
var index=JavaPowUpload.getFiles().get(0).getIndex();
// index of first file at the list. Value should be 0.
boolean isChecked()
Method returns true if item is checked; otherwise false.
var checked=JavaPowUpload.getFiles().get(0).isChecked();
void setChecked(boolean newValue)
Method checks or unckecks item.
boolean newValue - True to set item checked, false to uncheck item.
JavaPowUpload.getFiles().get(0).setChecked(false)
;
String getId()
Method returns the item id attribute.
var id=JavaPowUpload.getFiles().get(0).getId();
String getFilename()
Method returns only name of file (without directories).
var fileName=JavaPowUpload.getFiles().get(0).getFileName();
String getPath()
Method returns the path of the item in tree without file name.
var treePath=
JavaPowUpload.getFiles().get(0).getPath();
String getFullPath()
Method returns the full path of the item (included file name).
var treeFullPath=
JavaPowUpload.getFiles().get(0).getFullPath();
long getLength()
Method returns file size, in bytes or 0 if file length not specified (and not delivered from server) .
var length=
JavaPowUpload.getFiles().get(0).getLength();
String getMD5Hash()
Method returns string representation of file content MD5 hash or null if file was not downloaded.
var md5=JavaPowUpload.getFiles().get(0).getMD5Hash();
String getUrl()
Method returns "url" attribute value.
var url=JavaPowUpload.getFiles().get(0).getUrl();
boolean getUncompress()
Method returns the "uncompress" attribute value. True, if the zip archive should be uncompressed when download complete.
var uncompress=JavaPowUpload.getFiles().get(0).getUncompress();
boolean getDelete()
Method returns the "delete" attribute value. True, if the zip archive should be deleted after unpacking.
var delete=JavaPowUpload.getFiles().get(0).getDelete();