企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
# F.7 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`. Table F.7:聽 The globmapper mapper can take the following extra attributes. NameTypeDescriptionDefaultRequired`handledirsep``String`If this is specified, the mapper will ignore the difference between the normal directory separator characters - \\ and /. This attribute is useful for cross-platform build files.falseNo`casesensitive``Boolean`If this is false, the mapper will ignore case when matching the glob pattern.trueNo F.7.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.8:聽Result of mapping FromTo`test.txt``test.txt.bak``./foo/bar/test.txt``./foo/bar/test.txt.bak``mytxt``mytxt.bak``SomeClass.php``ignored`, SomeClass.php