commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [io][vote] FileUtils: decision on style
Date Mon, 28 Jul 2003 13:41:38 GMT

On Mon, 28 Jul 2003, Jeremias Maerki wrote:

> In FileUtils we currently have many duplicate method due to merging
> classes from several sources. For example, there is a extension(String)
> and getExtension(String) method.
> (Ironically, both have the same bug: "/tmp/" evaluates to
> "bar/README".)

Perfect :) The universe is a small place.

> So, we have to decide how these methods should be named. extension(),
> basename(), dirname() etc. are all named after their UNIX equivalents.
> getExtension(), removeExtension(), getPath() etc. are more Java-like and
> more descriptive (IMO).
> I'm +1 for following the latter style.

Me too. The only reason for the former style would be to match Sun's abuse
of Java style in

> Then, there are methods like fileCopy(String, String) and copyFile(File,
> File).
> I'm +1 for the "do-what"-style (in contrast to "what-do"), following
> Steve McConnell's Code Complete (from 5.2, Good Routine Names: "For a
> procedure name, use a strong verb followed by an object").

Me too. Must read that someday.

> In the meantime I'm writing some badly needed testcases for FileUtils...
> :-)



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

View raw message