In Groovy/Ant, I need to get the actual path that a particular symlink points to. For example, if I have some开发者_开发技巧 symlink foo pointing at /home/documents/bar
foo -> /home/documents/bar
Is there a way to take foo and resolve it to a pathname?
Until Java 7, can't you use:
println file.canonicalPath
To get the path that the link points to? Where:
println file.absolutePath
Prints the path to the symlink
精彩评论