B.38 PathToFileSetTask

Coverts a path to a fileset. This is useful if you have a path but need to use a fileset as input in a phing task.

Table B.39: Attributes

NameTypeDescriptionDefaultRequired
dir String The root of the directory tree of this FileSet. n/a Yes
pathrefid String The reference to the path to convert from. n/a Yes
ignorenonrelative Boolean This boolean controls what will happen if any of the files in the path are not in the directory for the fileset. If this is "true" the files are ignored, if this is "false" a build exception is thrown. (Note: if files are not present no check is made). falseNo
name String This is the identifier of the fileset to create. This fileset will contain the files that are relative to the directory root. Any files that are not present will not be placed in the set. n/aYes

B.38.1 Examples

<path id="modified.sources.path" dir="C:\Path\to\phing\classes\phing\" />
<pathtofileset name="modified.sources.fileset"
pathrefid="modified.sources.path"
dir="." />

<copy todir="C:\Path\to\phing\docs\api">
    <mapper type="glob" from="*.php" to="*.php.bak" />
    <fileset refid="modified.sources.fileset" />
</copy>