com.webcodepro.applecommander.util
Class Host

java.lang.Object
  extended by com.webcodepro.applecommander.util.Host

public class Host
extends java.lang.Object

Host contains static methods that return information that varies from one host operating system to another.

Author:
John B. Matthews

Method Summary
static java.lang.String getFileName(java.lang.String pathName)
          Get the host specific form of a file name suitable for a file dialog.
static java.lang.String getPrefDir()
          Get the host specific preferences directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPrefDir

public static java.lang.String getPrefDir()
Get the host specific preferences directory. On Mac OS X, this is ~/Library/Preferences/. On other host systems, it is the empty string.

Returns:
The empty string or the Mac OS X preferences directory with trailing '/'.

getFileName

public static java.lang.String getFileName(java.lang.String pathName)
Get the host specific form of a file name suitable for a file dialog. On Mac OS X, this is just the file name portion of the path name. On other systems, it is the unchanged path name.

Parameters:
pathName - The full path name of a file.
Returns:
The full path name or the file name for Mac OS X