Name
xad.GetObjectType -- get xad archive object type
Synopsis
type = xad.GetObjectType()
Function
This function returns the object type used by xad archives opened using the xad.OpenArchive() function. You can then use this object type with functions from Hollywood's object library such as GetAttribute(), SetObjectData(), GetObjectData(), etc.

In particular, Hollywood's GetAttribute() function may be used to query certain properties of xad archives opened using xad.OpenArchive(). The following attributes are currently supported by GetAttribute() for xad archives:

#XADATTRNUMENTRIES:
Returns the number of entries in the xad archive.

#XADATTRTYPE:
Returns a string describing the archiver name used by the current xad archive, e.g. "RAR" or "LhA".

Inputs
none

Results
type
internal xad archive type for use with Hollywood's object library
Example
xad.OpenArchive(1, "test.rar")
XAD_ARCHIVE = xad.GetObjectType()
numentries = GetAttribute(XAD_ARCHIVE, 1, #XADATTRNUMENTRIES)
type$ = GetAttribute(XAD_ARCHIVE, 1, #XADATTRTYPE)
The code above opens test.rar and queries the number of entries in the archive and its type via GetAttribute().

Show TOC