Can';t使用ANT脚本删除符号链接

Can';t使用ANT脚本删除符号链接,ant,symlink,delete-file,Ant,Symlink,Delete File,我正在尝试使用以下行删除符号链接: <symlink action="delete" link="/path/of/link/symlink"/> /directory/where/symlink/points应该是只读的。有没有办法删除符号链接?可以使用Ant任务删除指向只读资源的符号链接 <target name="delete-symlink"> <delete file="/path/of/link/symlink" followsymlinks="

我正在尝试使用以下行删除符号链接:

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

/directory/where/symlink/points应该是只读的。有没有办法删除符号链接?

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

<target name="delete-symlink">
  <delete file="/path/of/link/symlink" followsymlinks="false"
          removenotfollowedsymlinks="true" />
</target>

Ant任务文档中:

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 removeNotFollowedSymlinks是否为符号链接(不是文件/目录 如果尚未删除,则应将其链接到)删除 因为followSymlinks为false或 符号链接的最大数量太大。自从 蚂蚁1.8.0 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