F.3 GlobMapper
Prev | Appendix F. Core mappers | Next

## F.3 GlobMapper

The `GlobMapper` works like the `copy` command in DOS:

    <copy todir="/tmp">
      <mapper type="glob" from="*.php" to="*.php.bak"/>

      <fileset refid="someid" />
    </copy>

This will change the extension of all files matching the pattern `*.php` to `.php.bak`.

### F.3.1 Examples

    <mapper type="glob" from="*txt" to="*txt.bak"/>

Applying the mapper, you will get the following results from the following filenames:

Table F.3: Result of mapping

From | To
--- | ---
`test.txt` | `test.txt.bak`
`./foo/bar/test.txt` | `./foo/bar/test.txt.bak`
`mytxt` | `mytxt.bak`
`SomeClass.php` | `ignored`, SomeClass.php

Prev | Up | Next
F.2 FlattenMapper | Home | F.4 IdentityMapper