ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: FileUtils#normalize(File)
Date Tue, 29 Jul 2003 08:38:12 GMT
On Mon, 28 Jul 2003, Knut Wannheden <> 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

|-> B
|-> C

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message