Lev Kozakov wrote:
<snip>
e) Possible signatures for the 'installPearPackage' method:
installPearPackage( File pearFile ); // installs in current dir;
I think that's too many overloads for no good reason. I don't know what
code would use that, a command line tool maybe. In that case it's not
asking too much to specify the working directory as the install
directory (it's easy to obtain after all).
installPearPackage( File pearFile, String installDirPath ); // having 2
File
arguments is confusing;
To the contrary: either use strings, or use files. Mixing the two in a
method signature is bad style to my mind. You either place the burden
to create files on the user; when you require files, that's fair and
even adds to the documentation. Or you use string arguments for
everything and create the files yourself.
--Thilo