Iterates over the contents of an Eclipse folder, processing its template contents for each resource in the folder.
Conceptually, for each file in the folder a temporary model element named "file" is created with attributes filetype (the file extension), fullpath (the relative path with respect to the workspace), location (the full, physical file name), name (the name of the directory entry), relpath (the relative path with respect to the project) and filename (the name without the extension).
For each folder in the specified folder, a temporary model object named "folder" is created with attributes fullpath (the relative path with respect to the workspace), location (the full, physical directory name) and name (the name of the directory entry).
The directoryEntries tag then iterates over these temporary nodes, processing its template content for each of those nodes.
Nested tags can refer to the current iteration node in query expressions by using the specified variable name.
Tag Summary | |
---|---|
required |
<directoryEntries folder="value" location="value" name="value" filter="value" /> |
full tag |
<directoryEntries folder="value" location="value" name="value" filter="value" delimiter="value" /> |
Required Attributes |
|
---|---|
folder | The project relative path of the folder. |
location | Indicates the project containing the folder using one of two values: "source" and "target". A location of source means that the folder is in the same project as the original input file (the "appdef"). A location of "target" means that the folder is in the current target project. The target project by default is the source project but can be changed using the defaultProject tag. |
name | The name to associate with the current iteration object. The directoryEntries tag will process its content for each member of the specified Eclipse folder and during that processing will associate this name with a model object describing the resource. |
filter | Specifies filters in the form of a DPTK query expression. The query expression is applied against the list of virtual model elements that describe the contents of the folder to limit the collection of nodes over which to iterate. |
Optional Attributes | |
---|---|
delimiter | A string to be written out after every iteration but the last |
Example | |
---|---|
<directoryEntries folder="/WebContent/jsp" location="target" name="current-jsp" filter="file filetype='jsp'" delimiter="" > content </directoryEntries> This directoryEntries tag will iterate over all of the files with filetype "jsp" in folder /WebContent/jsp in the current target project. For each such file, the directoryEntries tag will create a temporary model object named file and with attributes named "filetype", "fullpath", "location", "name", "relpath" and "filename". The directoryEntries will associate the name "current-jsp" with this node (for use in subsequent query expressions) and will process its contents once for that node. |
© Copyright IBM Corporation 2000,
2006. All Rights Reserved.