The<file>
and<dir>
tags have a number of options available to them. Both tags require a name
attribute, defining the name of the element as located on disk. Unlike an operating system, package.xml
does not allow empty directories. All<dir>
tags must contain at least one<file>
tag. As described in the previous section, there are two ways to describe the location of a file in package.xml
, either with a complete relative path separated by the UNIX path separator /:
<file role="php" name="foo/test.php"/>
Or, alternately as:
<dir name="foo"> <file role="php" name="test.php"/> </dir>
All files must have a role attribute. This attribute tells the installer how to handle a file. The default list of allowed file roles is:
Default File Roles | |
---|---|
Role |
Description |
php |
PHP script files, like "PEAR.php" |
data |
Data files used by the script (read-only) |
doc |
Documentation files |
test |
Test scripts... |