I have an ant build I'm trying to customize so that the files being built are deployed outside of my project folder.
The Java System properties give me access to ${user.home} but I need to be higher "Machintosh HD/Applications" to be exact.
How can I point ant to a directory higher than user.home?
You can just use forward slashes (Unix style) and just start your paths with /
:
<property name="root.dir" location="/"/>
and it will resolve the root of the default drive appropriate to your OS platform (e.g. C:\
on Windows and /
on Unix).
<property name="tmp.dir" location="/tmp"/>
will resolve to C:\tmp
or /tmp
, depending on your platform.
Try have a look on File.listRoots()
. Combining with ANT java task might get the desired result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With