|
JavaPowUpload 2.0
JavaPowUpload.DownloadItem object |
Home
page Contact
support
|
DownloadItem object methods
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.isFile
boolean isFile()
Method returns true if item is file, false if folder.
var isfile=JavaPowUpload.getFiles().get(0).isFile();
getIndex
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.
isChecked
boolean isChecked()
Method returns true if item is checked; otherwise false.
var checked=JavaPowUpload.getFiles().get(0).isChecked();
setChecked
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);
getId
String getId()
Method returns the item id attribute.
var id=JavaPowUpload.getFiles().get(0).getId();
getFilename
String getFilename()
Method returns only name of file (without directories).
var fileName=JavaPowUpload.getFiles().get(0).getFileName();getPath
String getPath()
Method returns the path of the item in tree without file name.
var treePath=JavaPowUpload.getFiles().get(0).getPath();
getFullPath
String getFullPath()
Method returns the full path of the item (included file name).
var treeFullPath=JavaPowUpload.getFiles().get(0).getFullPath();
getLength
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();
getMD5Hash
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();
getUrl
String getUrl()
Method returns "url" attribute value.
var url=JavaPowUpload.getFiles().get(0).getUrl();
getUncompress
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();
getDelete
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();
getDescription
String getDescription()
Method returns file description text.
var userPath=JavaPowUpload.getFiles().get(0).getDescription();
getStatus
Integer getStatus()
Method returns file status constant.
Available values:var status=JavaPowUpload.getFiles().get(0).getStatus();