This example allows you to build platform-specific paths and directory hierarchies. When you build a path with any of ant's task, Ant is quite happy to convert the separators in to ones appropriate for the operating system on which it is running. Ant will also do the conversion if you pass the string that you have built to its tasks. Therefore, you could rewrite the previous listing.
Source code of build.xml:
<project name="FileSeperator" default="echo" basedir=".">
If the display shows a mixture of file separators, don't disturb ant that is still treating these as strings. The following output will be displayed if you execute ant command on the command prompt.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial