The DropZoneFile object represents a file in the DropZone. It can be retrieved from the DropZone object via the files property or the find method. Both of these calls return an array of DropZoneFile objects, keyed on the filename. You can also call dir() on a DropZoneFile that represents a zipfile to get an array of DropZoneFile objects representing the zipfile content.


The following properties can be accessed for a DropZoneFile object:


Property

Type

Description

dzpath

String

The relative path of the file in the DropZone.

repopath

String

The relative path of the file as located in the Repository (this path is relative to the base directory of the repository).

size

Integer

The size of the file in bytes.

ctime

Date

The creation time of the file.

mtime

Date

The modified time of the file.


The following methods can be called on the DropZoneFile object:


Method

Return Type

Description

delete()

Integer

Removes the file represented by the DropZoneFile object from the DropZone. After this operation the file will no longer be transferred to the target server in any subsequent transfer operation. Returns 1 (true) if the file was successfully removed, 0 otherwise.

dir()

Array

If the DropZoneFile refers to a zipfile (including web archive files such as WAR, JAR, EAR) then dir() will return an array of DropZoneFile objects which represent the content of the zipfile.  The array is keyed by the filename and can be used as input to the zipget and zipdel statements.


NOTE: See the description for zipadd, zipget and zipdel later in this document.