I am working on an ANT pattern parser as part of a large server project.
There are some good examples of ANT patterns in the answer to this post: How do I use Nant/Ant naming patterns? however, I am still confused about some possible permutations.
One of the examples on the ANT pattern documentation here http://nant.sourceforge.net/release/0.85/help/types/fileset.html is as follows:
**/test/**
Matches all files that have a test element in their path, including test as a filename.
My understanding is that **
matches one or more directories and also files under those directories. So I would expect **/test/**
to match src/test/subfolder/file.txt
and test/file2.txt
but this statement seems to imply that it would also match a file named src/test
. Is this correct even though there is a /
after the test
in the pattern?
Also, its not clear whether the following patterns would be valid:
folder**
folder1/folder**
**folder/file.txt
I would imagine that they would work the same as
folder*/**
folder1/folder*/**
**/*folder/file.txt
but are they allowed?
<pathconvert>
and<fileset>
, and you will see how the patterns actually work. – coolcfan