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

UploadItem object methods  



isFile method

getIndex method

isChecked method

setChecked method

getModificationDate method

getFilename method

getPath method

getFullPath method

getLength method

getMD5Hash method

getFileSystemPath method


isFile

boolean isFile()

Description

Method returns true if item is file; false is 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);

 

getModificationDate

String getModificationDate()

Description

Method returns Date object that represents last modification date.

Example

var modified=JavaPowUpload.getFiles().get(0).getModificationDate();


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.

Example

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

 

getMD5Hash

String getMD5Hash()

Description

Method returns string representation of file content MD5 hash.

Example

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



getFileSystemPath

String getFileSystemPath()

Description

Method returns full path to file on user computer.

Example

var userPath=JavaPowUpload.getFiles().get(0).getFileSystemPath();