Loads a package's information (from package-info.xml) and returns a representative array.


array getPackageInfo (string $gzfilename)

Parameter $gzfilename

Expected type: String
Description: The name of the package file

Return value

Expected type: Array
Description: An array of information about the package (or false if package-info.xml couldn't be found)

Array Elements
Key Optional Expected type Description
file no String The name of the package file (same as the parameter passed to this function)
type no Enumerated String The type of package, as specified by package-info.xml. Currently can be 'avatar', 'modification' or 'theme' (although themes generally aren't installed this way). Defaults to 'modification' if no type is specified.
xml no Object An xmlArray object to be used for the XML parser


  • Expects the file to be a package in Packages/.
  • Returns false if the package-info is invalid.
  • Returns a basic array of id, version, filename, and similar information.
  • In the array returned, an xmlArray is available in 'xml'.