commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [io] FilenameUtils
Date Sat, 30 Oct 2004 22:49:06 GMT
From: "Martin Cooper" <>
> I expected that FilenameUtils would manipulate file names, no more, no
The 3 File manipulation methods have now gone.

> > > 7) There are also two private methods. internalize and externalize.
> > > Nothing uses the latter and the former is used by getExtension only
> > > and should be inlined into its code. There is also an unused
> > > INTERNAL_SEPARATOR variable that needs killing.
> > I would vote to make them public. separatorsToUnix(),
> > plus separatorsToSystem()
> I deliberately didn't do that, because that isn't the intended
> semantic. The intent is to convert to some internal form that we
> standardise on amongst ourselves. It wouldn't matter if that internal
> form used '?' as the separator. I happened to choose '/' based on
> earlier comments on what the JDK does, but I certainly didn't think of
> that as converting the separators to Unix style. Also, I made these
> methods private because whatever we decide as for an internal form
> shouldn't matter to any use of the class.

It may be that internalize is a separate concept. For the moment, I have
added the public separatorsToXxx methods as they seem to have a logical fit
on a class about filenames.

I also renamed indexOfLastPathSeparator to indexOfLastSeparator, as a path
separator has a specific other meaning on the File class. There is now an
indexOfExtension method too, plus the beginnings of better class javadoc.


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

View raw message