|
12345678910111213141516171819202122232425262728293031323334 |
- Selector API
- ============
-
- Currently our filesets allow us to select a set of files based on name patterns.
- For instance we could create a set of all the files that end with ".java".
- However there are cases when you wish to select files based on their other
- attributes, such as if they are read only or if they are older than a specified
- date etc.
-
- The selector API is one such mechanism to do this. The selector API will allow
- you to build file sets based on criteria other than name. Some possible criteria
- would be
-
- Is the file readable?
- Is the file writeable?
- What date was the file modified on?
- What size is the file?
- Does the contents contain the string "magic"?
-
- If we end up supporting a VFS then we could expand the number of selectors
- considerably. A mock representation that has been proposed before is the
- following. Of course this is subject to change as soon as someone wants to
- tackle this action ;)
-
- <include name="**/*.java">
- <selector type="permission" value="r"/>
-
- <!-- could optionally be directory/or some other system specific features -->
- <selector type="type" value="file"/>
- <selector type="modify-time"
- operation="greater-than"
- value="29th Feb 2003"/>
- </include>
-
|