You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2004/12/04 20:41:38 UTC

[io] Filename case sensitive comparisons

I have added various methods to compare two filenames
- isExtension(filename)
- equals(filename1, filename2)
- equalsNormalized(filename1, filename2)

These compare case sensitive on Unix and case insenstive on Windows. Is this
OK with everyone?

I will fix the Wildcard method to do the same if no-one objects.

Stephen




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


Re: [io] Filename case sensitive comparisons

Posted by Martin Cooper <mf...@gmail.com>.
On Sat, 4 Dec 2004 19:41:38 -0000, Stephen Colebourne
<sc...@btopenworld.com> wrote:
> I have added various methods to compare two filenames
> - isExtension(filename)
> - equals(filename1, filename2)
> - equalsNormalized(filename1, filename2)
> 
> These compare case sensitive on Unix and case insenstive on Windows. Is this
> OK with everyone?

Looks good to me. Would it be worthwhile to add a method that answers
the question "are these filenames the same, but different in case?"?
This wouldn't be useful on Unix, of course, but sometimes in Windows
you care about the case. (For example, in a web app, WEB-INF *must* be
in upper case.)

> I will fix the Wildcard method to do the same if no-one objects.

Fine with me.

--
Martin Cooper


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

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