On 26/06/2009, jscripter <pc88m...@gmail.com> wrote: > > The main problem with this is that I don't want to keep track of which > symlinks to delete. > The tree I am deleting may have lots of symlinks. > > I realize that Java doesn't know about symlinks and that Ant uses a > heuristic to determine if a file object is a symlink, but is there a way to > create a fileset of everything that looks like a symlink?
Just a thought - is there a way to build a fileset from the output of an <exec> task? If so, how about using that to call "find . -type l -print" in the relevant directory? Andy -- http://pseudoq.sourceforge.net/ > > Scot P. Floess-2 wrote: > > > > > > Have you looked at the symlink task? > > > > http://ant.apache.org/manual/OptionalTasks/symlink.html > > > > On Mon, 22 Jun 2009, jscripter wrote: > > > >> > >> I am using this target definition to remove all the files under ${TOP} > >> which > >> contains some symlinks to other directories: > >> > >> <target name="clean"> > >> <delete includeEmptyDirs="true" failonerror="false"> > >> <fileset dir="${TOP}" followsymlinks="false"/> > >> </delete> > >> </target> > >> > >> However, I've noticed that delete is not deleting the symlinks. > >> > >> I'd like to get the same results as /bin/rm -rf under Unix, i.e. the > >> symlinks are deleted but not followed. Is there a way to do that with the > >> delete task? --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org