On 2012-02-05, Mansour Al Akeel wrote: > I have been looking and developing some custom task for ant, for the last > few days. I noticed that ant tasks don't use java.io directly. I am > assuming this is due to the way java.io.File behave on different platforms, > and the support for patterns .... etc.
You must not forget that parts of Ant have been written at a time where Java2 was too new to require it as runtime environment. > However, now with java 7, we have the Path class that is very convenient to > use. I think having this will make writing tasks easier, by cuting down the > steps to convert between ants Path and java.nio.file.Path. > Are there any interests ? Yes, there is. Just now we have voted to accept Java5 (yes, 5, not 7) as our minimum requirement for Ant's trunk following the upcoming 1.8.3 release. This means we can not use Java7 features directly. One approach that may be possible is to write a FileUtils replacement using Java7 features. Almost all file system interactions of Ant go through FileUtils and Ant's core could detect at runtime whether Java7 is around and use the matching FileUtils class. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org