|
JavaPowUpload 2.1
JavaPowUpload.DownloadItem object |
Home
page Contact
support
|
DownloadItem object methods
DownloadItem object provides a way to access individual files added to the list. You cannot create DownloadItem object directly. You should obtain it by the getFiles() method of an JavaPowUpload object.isFile
boolean isFile()
The method returns true if the item is a file, false if it's a folder.
var isfile=JavaPowUpload.getFiles().get(0).isFile();
getId
String getId()
The method returns unique indentifier of a file.
var index=JavaPowUpload.getFiles().get(0).getId();
getIndex
long getIndex()
The method returns 0-based index of an item.
var index=JavaPowUpload.getFiles().get(0).getIndex(); // index of the first file in the list. The value should be 0.
isChecked
boolean isChecked()
The method returns true if the item is checked; otherwise false.
var checked=JavaPowUpload.getFiles().get(0).isChecked();
setChecked
void setChecked(boolean newValue)
The method checks or unckecks an item.
boolean newValue - True - to set an item checked, false - to uncheck an item.
JavaPowUpload.getFiles().get(0).setChecked(false);
getFilename
String getFilename()
The method returns only a name of the file (without directories).
var fileName=JavaPowUpload.getFiles().get(0).getFileName();getPath
String getPath()
The method returns the path of the item in the tree without a file name.
var treePath=JavaPowUpload.getFiles().get(0).getPath();
getFullPath
String getFullPath()
The method returns the full path of the item (included a file name).
var treeFullPath=JavaPowUpload.getFiles().get(0).getFullPath();
getLength
long getLength()
The method returns a file size, in bytes or 0, if the file length is not specified (and not delivered from server) .
var length=JavaPowUpload.getFiles().get(0).getLength();
getMD5Hash
String getMD5Hash()
The method returns a string representation of the file content MD5 hash or null if the file was not downloaded.
var md5=JavaPowUpload.getFiles().get(0).getMD5Hash();
getUrl
String getUrl()
The method returns "url" attribute value.
var url=JavaPowUpload.getFiles().get(0).getUrl();
getUncompress
boolean getUncompress()
The method returns the "uncompress" attribute value. True, if the zip archive should be uncompressed when download is complete.
var uncompress=JavaPowUpload.getFiles().get(0).getUncompress();
getDelete
boolean getDelete()
The 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()
The method returns a file description text.
var userPath=JavaPowUpload.getFiles().get(0).getDescription();
getStatus
Integer getStatus()
The method returns file status constant.
var status=JavaPowUpload.getFiles().get(0).getStatus();