commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell" <flame...@gmail.com>
Subject Re: [VFS] renaming file with only case differences
Date Wed, 03 May 2006 16:49:31 GMT
On 5/2/06, Filip Defoort <filipdef@cirquedigital.com> wrote:
> Hi,
>
> I'm running in the following problem: VFS doesn't seem to be able to
> rename a file to another name when only the case is different. On windows,
> since the file system is case insensitive, File.exists() returns true, which
> causes FileObject.moveTo() to actually delete the source file (since it's
> considered the same file as the target).... that's obviously not
> desirable...
>
> Anybody any ideas on how I can do a proper rename ? Would it be better
> to have a separeate renameTo method (not moveTo) that would not delete
> the target first ?

Would think that VFS could be asking what the canonical name of the
two files are, and if they equal each other then it does a no-op.
Might be of value on OS X too, not sure how its flirtation with case
insensitivity affects the JVM.

Not looked at the source before though, so just a thought.

Hen

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


Mime
View raw message