Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 77770 invoked from network); 21 Mar 2009 20:28:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Mar 2009 20:28:20 -0000 Received: (qmail 30618 invoked by uid 500); 21 Mar 2009 20:28:16 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 30581 invoked by uid 500); 21 Mar 2009 20:28:16 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 30570 invoked by uid 99); 21 Mar 2009 20:28:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Mar 2009 13:28:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [207.234.209.65] (HELO dedicated.riftware.com) (207.234.209.65) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Mar 2009 20:28:08 +0000 X-ClientAddr: 166.189.192.87 Received: from Inbox ([166.189.192.87]) (authenticated bits=0) by dedicated.riftware.com (8.14.1/8.14.1) with ESMTP id n2LKR87C013225 for ; Sat, 21 Mar 2009 16:27:40 -0400 Message-Id: <200903212027.n2LKR87C013225@dedicated.riftware.com> MIME-Version: 1.0 content-class: From: Andrew Chandler Subject: RE: Detecting directory versus symlink Date: Sat, 21 Mar 2009 15:28:29 -0500 Importance: normal X-Priority: 3 To: Ant Users List Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Riftware-MailScanner-Information: Please contact the ISP for more information X-Riftware-MailScanner: Found to be clean X-Riftware-MailScanner-From: andy@riftware.com X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No -----Original Message----- From: Matt Benson Sent: Saturday, March 21, 2009 2:15 PM To: Ant Users List Subject: Re: Detecting directory versus symlink It is intended that should silently ignore = real files. I would recommend testing this in existing releases before you= rely on it, but if you're a bleeding-edge type the code has been reworked = quite a bit in Ant's trunk so should cure any problems you might encounter = with the released code (not saying you will, but check!). If you then try = to delete the symlink and the directory is still available, it must be a re= al one. Failing that, you could drop down to scripting or custom task leve= l where FileUtils has a method to check whether a file is a link (SymbolicL= inkUtils in trunk)--the basic check is whether a file's absolute path and i= ts canonical path are equal. 's documentation includes a caveat a= bout using this check on non-*nix systems, but hopefully that is a moot poi= nt for you. Hope this helps, Matt --- On Fri, 3/20/09, Michael Delaney wrote: > From: Michael Delaney > Subject: Detecting directory versus symlink > To: "Ant Users List" > Date: Friday, March 20, 2009, 2:36 PM > In ant 1.7.0, is there a way to test > if a resource is a directory or if it's a symlink? >=20 > I have a directory /app/product/foo which may, or may not > be a symlink. If it's a symlink, I just want to remove the > symlink but if it's a directory, I have another set of > instructions I need to follow. Anyone have any advice on > what the best way to determine if a resource is a directory > or a symlink? >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 [The entire original message is not included] --=20 This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org