net.sourceforge.atunes.kernel.utils
Class SystemProperties

java.lang.Object
  extended by net.sourceforge.atunes.kernel.utils.SystemProperties

public class SystemProperties
extends java.lang.Object

The Class SystemProperties.


Nested Class Summary
static class SystemProperties.OperatingSystem
          Operating Systems Enum.
 
Field Summary
static java.lang.String fileSeparator
          OS dependent file separator.
static boolean isJava6Update10OrLater
          Java 6 Update 10 or later?
static java.lang.String lineTerminator
          OS dependent line terminator.
static SystemProperties.OperatingSystem OS
          Operating System.
static java.lang.String userHome
          User home dir.
 
Constructor Summary
SystemProperties()
           
 
Method Summary
static java.io.File getFileFromUserConfigFolder(java.lang.String name, boolean useWorkDir)
          Returns file from the user config folder.
static java.lang.String getTempFolder()
          Return path to temp folder, which is inside user config folder.
static java.lang.String getUserConfigFolder(boolean useWorkDir)
          Gets folder where state is stored.
static void setCustomConfigFolder(java.lang.String customConfigFolder)
          Sets the custom config folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userHome

public static final java.lang.String userHome
User home dir.


fileSeparator

public static final java.lang.String fileSeparator
OS dependent file separator.


lineTerminator

public static final java.lang.String lineTerminator
OS dependent line terminator.


OS

public static final SystemProperties.OperatingSystem OS
Operating System.


isJava6Update10OrLater

public static final boolean isJava6Update10OrLater
Java 6 Update 10 or later? (but not Java 7 yet).

Constructor Detail

SystemProperties

public SystemProperties()
Method Detail

getUserConfigFolder

public static java.lang.String getUserConfigFolder(boolean useWorkDir)
Gets folder where state is stored. If not exists, it's created

Parameters:
useWorkDir - If the current working directory should be used
Returns:
The folder where the state is stored

getFileFromUserConfigFolder

public static java.io.File getFileFromUserConfigFolder(java.lang.String name,
                                                       boolean useWorkDir)
Returns file from the user config folder.

Parameters:
name - The name of the file (Example: aTunes.log or folder/file.abc)
useWorkDir - If the current working directory should be used
Returns:
The file from the user config folder

setCustomConfigFolder

public static void setCustomConfigFolder(java.lang.String customConfigFolder)
Sets the custom config folder.

Parameters:
customConfigFolder - the customConfigFolder to set

getTempFolder

public static java.lang.String getTempFolder()
Return path to temp folder, which is inside user config folder.

Returns:
the temp folder


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.