如何使用Ant删除符号链接?

如何使用Ant删除符号链接?,ant,symlink,Ant,Symlink,我正在尝试使用以下行删除ant脚本中的符号链接: <symlink action="delete" link="/path/of/link/symlink"/> 但它显示了一个错误: 无法在/directory/where/symlink/points中创建临时文件 /directory/where/symlink/points应该是只读的 有没有一种方法,我可以删除符号链接,而不搞砸其他事情?它是大脚本的一部分。指向只读资源的符号链接可以使用Ant任务删除 <targe

我正在尝试使用以下行删除ant脚本中的符号链接:

<symlink action="delete" link="/path/of/link/symlink"/>

但它显示了一个错误:

无法在/directory/where/symlink/points中创建临时文件

/directory/where/symlink/points
应该是只读的


有没有一种方法,我可以删除符号链接,而不搞砸其他事情?它是大脚本的一部分。

指向只读资源的符号链接可以使用
Ant任务删除

<target name="delete-symlink">
<delete file="/path/of/link/symlink" followsymlinks="false"
      removenotfollowedsymlinks="true" />
</target>
希望它能起作用

removeNotFollowedSymlinks  Whether symbolic links (not the files/directories 
                       they link to) should be removed if they haven't been 
                       followed because followSymlinks was false or the 
                       maximum number of symbolic links was too big. Since 
                       Ant 1.8.0