This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Config using File
- From: Andrew Cagney <cagney at redhat dot com>
- To: frysk at sourceware dot org
- Date: Tue, 06 Feb 2007 16:09:21 -0500
- Subject: Config using File
FYI,
In Java the Right Way to handle anything involving a file or path is to
create a File object and manipulate that. For instance, instead of:
Config.getBinDir () + "/" + "fstack"
the coder should write:
new File (Config.getBinDir (), "fstack");
which will take care of all the "/" portability mess.
I've switched most of the Config directory paths to return File, instead
of String. Two, namely getGladeDir() and getImagesDir() were not
switched. They are passed onto Java-GNOME and that currently takes a
String. Partially converting them turned into a rats nest :-)
Andrew