ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: FileUtils#normalize(File)
Date Tue, 29 Jul 2003 08:38:12 GMT
On Mon, 28 Jul 2003, Knut Wannheden <knut.wannheden@paranor.ch> wrote:

> I get the impression FileUtils#normalize(File) mimics the behaviour
> of File#getCanonicalFile().

To a certain extent, yes.

> But I suppose there's a good reason for not using that method

Symbolic links.

On Unix, getCanonicalPath will resolve the link and return the
absolute filename of the file you've linked to.  In most situations
this is not what we want.  Suppose a directory structure

A
|-> B
|-> C

for <fileset dir="A" includes="B/**"/>.  We want to include B, even if
it happens to be a symbolic link to C.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message