Unable to delete symbolic link using ANT Script

I am trying to remove a symbolic link using the following line:

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

It gives an error message:

 Could not create tempfile in /directory/where/symlink/points 

The / directory / where / symlink / points option should be read-only. Is there a way that I could just remove the symbolic link?

+4
source share
1 answer

Characters pointing to read-only resources can be removed using the <delete> Ant task.

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

From the <delete> Ant documentation:

  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
+6
source

Source: https://habr.com/ru/post/1438348/


All Articles