Return-Path: Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 47641 invoked by uid 500); 28 Jul 2003 10:33:49 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 47627 invoked from network); 28 Jul 2003 10:33:48 -0000 Received: from mail.paranor.ch (HELO nts?par1.paranor.ch) (195.65.4.180) by daedalus.apache.org with SMTP; 28 Jul 2003 10:33:48 -0000 Received: by nts_par1.paranor.ch with Internet Mail Service (5.5.2448.0) id <3SL6CFW1>; Mon, 28 Jul 2003 12:33:42 +0200 Message-ID: <36E996B162DAD111B6AF0000F879AD1A76C317@nts_par1.paranor.ch> From: "Wannheden, Knut" To: 'Ant Developers List' Subject: FileUtils#normalize(File) Date: Mon, 28 Jul 2003 12:33:40 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C354F3.B6B54528" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C354F3.B6B54528 Content-Type: text/plain; charset="iso-8859-1" I've noticed that the normalize(File) method in FileUtils requires that the File to normalize is absolute. I was wondering what the reason is for this reason. Would it be too complex to normalize a relative path on Windows systems? I think it makes perfectly sense to normalize a path like "./foo" into "foo" or "foo/bar/.." into "foo". Even a path like "../foo" could be normalized using the system property "user.dir", but it could also cause an Exception to be thrown as the absolute path "/../foo" would (a Unix system would even normalize that as "/foo"). The reason I'm askin is because I wanted to reuse the code in normalize which handles ".." and "." path segments. But maybe I should copy and paste instead. -- knut ------_=_NextPart_001_01C354F3.B6B54528--