com.denova.runtime
Class WindowsDirs

java.lang.Object
  extended by com.denova.runtime.WindowsDirs

public class WindowsDirs
extends java.lang.Object

Access standard Windows directories.

Author:
DeNova © 1997-2011 DeNova Last modified: 2011-01-22

Constructor Summary
WindowsDirs()
           
 
Method Summary
static java.lang.String getAppDataDirectory()
          Get the Applications data directory for the current user.
static java.lang.String getAppDataDirectory(java.lang.String user)
          Get the Applications data directory.
static java.lang.String getDesktopDir()
          Get the directory name, including the trailing \, where the desktop items are stored for the current user.
static java.lang.String getDesktopDir(java.lang.String user)
          Get the directory name, including the trailing \, where the desktop items are stored.
static java.lang.String getDocumentsDirectory()
          Get the Documents directory for the current user.
static java.lang.String getDocumentsDirectory(java.lang.String user)
          Get the Documents directory.
static java.lang.String getMenuDir()
          Get the directory name, including the trailing \, where the menus are stored for the current user.
static java.lang.String getMenuDir(java.lang.String user)
          Get the directory name, including the trailing \, where the menus are stored.
static java.lang.String getProgramManagerDirectory()
           
static java.lang.String getRoamingAppDataDirectory()
          Get the roaming app data directory for the current user.
static java.lang.String getRoamingAppDataDirectory(java.lang.String user)
          Get the roaming app data directory.
static java.lang.String getStartupMenuDir()
          Get the Startup menus directory, including the trailing \, for the current user.
static java.lang.String getStartupMenuDir(java.lang.String user)
          Get the Startup menus directory, including the trailing \.
static java.lang.String getWindowsDirectory()
          Get the Windows directory name from the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowsDirs

public WindowsDirs()
Method Detail

getWindowsDirectory

public static java.lang.String getWindowsDirectory()
Get the Windows directory name from the registry. On error, return null.

Returns:
the Windows directory name

getProgramManagerDirectory

public static java.lang.String getProgramManagerDirectory()
Returns:
the Program Files directory name from the registry.

On error, returns null


getAppDataDirectory

public static java.lang.String getAppDataDirectory()
Get the Applications data directory for the current user.

Returns:
the AppData directory name from the registry.

On error, returns null


getAppDataDirectory

public static java.lang.String getAppDataDirectory(java.lang.String user)
Get the Applications data directory.

Parameters:
user - WindowsConstants.CurrentUser or WindowsConstants.AllUsers
Returns:
the AppData directory name from the registry.

On error, returns null


getRoamingAppDataDirectory

public static java.lang.String getRoamingAppDataDirectory()
Get the roaming app data directory for the current user.

Returns:
the roaming app data directory name from the registry.

On error, returns null


getRoamingAppDataDirectory

public static java.lang.String getRoamingAppDataDirectory(java.lang.String user)
Get the roaming app data directory.

Parameters:
user - WindowsConstants.CurrentUser or WindowsConstants.AllUsers
Returns:
the roaming app data directory name from the registry.

On error, returns null


getDocumentsDirectory

public static java.lang.String getDocumentsDirectory()
Get the Documents directory for the current user.

Returns:
the Documents directory name from the registry.

On error, returns null


getDocumentsDirectory

public static java.lang.String getDocumentsDirectory(java.lang.String user)
Get the Documents directory.

Parameters:
user - WindowsConstants.CurrentUser or WindowsConstants.AllUsers
Returns:
the Documents directory name from the registry.

On error, returns null


getMenuDir

public static java.lang.String getMenuDir()
Get the directory name, including the trailing \, where the menus are stored for the current user.

Returns:
the menu directory name or null if an error.

getMenuDir

public static java.lang.String getMenuDir(java.lang.String user)
Get the directory name, including the trailing \, where the menus are stored.

Parameters:
user - WindowsConstants.CurrentUser or WindowsConstants.AllUsers
Returns:
the menu directory name or null if an error.

getStartupMenuDir

public static java.lang.String getStartupMenuDir()
Get the Startup menus directory, including the trailing \, for the current user.

Returns:
the startup menu directory name from the registry.

On error, returns null


getStartupMenuDir

public static java.lang.String getStartupMenuDir(java.lang.String user)
Get the Startup menus directory, including the trailing \.

Parameters:
user - WindowsConstants.CurrentUser or WindowsConstants.AllUsers
Returns:
the startup menu directory name from the registry.

On error, returns null


getDesktopDir

public static java.lang.String getDesktopDir()
Get the directory name, including the trailing \, where the desktop items are stored for the current user.

Returns:
the desktop directory name or null if an error.

getDesktopDir

public static java.lang.String getDesktopDir(java.lang.String user)
Get the directory name, including the trailing \, where the desktop items are stored.

Parameters:
user - WindowsConstants.CurrentUser or WindowsConstants.AllUsers
Returns:
the desktop directory name or null if an error.