com.jniwrapper.win32.shell
Class ShellFolder

java.lang.Object
  extended by com.jniwrapper.util.EnumItem
      extended by com.jniwrapper.win32.shell.ShellFolder

public class ShellFolder
extends com.jniwrapper.util.EnumItem

This class provides access to standard Windows shell folders.

Note: This functionality is available for Windows 98 / 2000 / XP.
Under Windows NT 4.0 or Windows 95 Microsoft Internet Explorer with Desktop Update must be installed.


Field Summary
static ShellFolder ADMINTOOLS
           
static ShellFolder ALTSTARTUP
           
static ShellFolder APPDATA
           
static ShellFolder BITBUCKET
           
static ShellFolder CDBURN_AREA
           
static ShellFolder COMMON_ADMINTOOLS
           
static ShellFolder COMMON_ALTSTARTUP
           
static ShellFolder COMMON_APPDATA
           
static ShellFolder COMMON_DESKTOPDIRECTORY
           
static ShellFolder COMMON_DOCUMENTS
           
static ShellFolder COMMON_FAVORITES
           
static ShellFolder COMMON_MUSIC
           
static ShellFolder COMMON_PICTURES
           
static ShellFolder COMMON_PROGRAMS
           
static ShellFolder COMMON_STARTMENU
           
static ShellFolder COMMON_STARTUP
           
static ShellFolder COMMON_TEMPLATES
           
static ShellFolder COMMON_VIDEO
           
static ShellFolder COMPUTER
           
static ShellFolder CONTROLS
           
static ShellFolder COOKIES
           
static ShellFolder DESKTOP
           
static ShellFolder DESKTOPDIRECTORY
           
static ShellFolder DRIVES
           
static ShellFolder FAVORITES
           
static ShellFolder FONTS
           
static ShellFolder HISTORY
           
static ShellFolder INTERNET
           
static ShellFolder INTERNET_CACHE
           
static ShellFolder LOCAL_APPDATA
           
static ShellFolder MYDOCUMENTS
           
static ShellFolder MYMUSIC
           
static ShellFolder MYPICTURES
           
static ShellFolder MYVIDEO
           
static ShellFolder NET_CONNECTIONS
           
static ShellFolder NETHOOD
           
static ShellFolder NETWORK
           
static ShellFolder PERSONAL
           
static ShellFolder PRINTERS
           
static ShellFolder PROFILE
           
static ShellFolder PROFILES
           
static ShellFolder PROGRAM_FILES
           
static ShellFolder PROGRAM_FILES_COMMON
           
static ShellFolder PROGRAMS
           
static ShellFolder RECENT
           
static ShellFolder SEND_TO
           
static ShellFolder START_MENU
           
static ShellFolder STARTUP
           
static ShellFolder SYSTEM
           
static ShellFolder TEMPLATES
           
static ShellFolder WINDOWS
           
 
Method Summary
 java.lang.String getAbsolutePath()
          Returns absolute path of the shell folder.
 int getFolderID()
           
static Handle getFolderIDList(int folderID)
          Retrieves ID list for the shell folder specified by folderID.
static java.lang.String getPathFromIDList(Handle idList)
          Retrieves absolute folder path from ID list.
static java.lang.String getSpecialFolderPath(int folderID)
          Retrieves absolute path of the shell folder.
static java.lang.String getSpecialFolderPath(int folderID, boolean create)
          Retrieves absolute path of shell folder.
static boolean isFunctionalityAvailable()
          Returns true if the shell folder functionality is available for current operating system.
 boolean isVirtual()
           
 
Methods inherited from class com.jniwrapper.util.EnumItem
equals, getLongValue, getValue, hashCode, isOneOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADMINTOOLS

public static final ShellFolder ADMINTOOLS

ALTSTARTUP

public static final ShellFolder ALTSTARTUP

APPDATA

public static final ShellFolder APPDATA

BITBUCKET

public static final ShellFolder BITBUCKET

CDBURN_AREA

public static final ShellFolder CDBURN_AREA

COMMON_ADMINTOOLS

public static final ShellFolder COMMON_ADMINTOOLS

COMMON_ALTSTARTUP

public static final ShellFolder COMMON_ALTSTARTUP

COMMON_APPDATA

public static final ShellFolder COMMON_APPDATA

COMMON_DESKTOPDIRECTORY

public static final ShellFolder COMMON_DESKTOPDIRECTORY

COMMON_DOCUMENTS

public static final ShellFolder COMMON_DOCUMENTS

COMMON_FAVORITES

public static final ShellFolder COMMON_FAVORITES

COMMON_MUSIC

public static final ShellFolder COMMON_MUSIC

COMMON_PICTURES

public static final ShellFolder COMMON_PICTURES

COMMON_PROGRAMS

public static final ShellFolder COMMON_PROGRAMS

COMMON_STARTMENU

public static final ShellFolder COMMON_STARTMENU

COMMON_STARTUP

public static final ShellFolder COMMON_STARTUP

COMMON_TEMPLATES

public static final ShellFolder COMMON_TEMPLATES

COMMON_VIDEO

public static final ShellFolder COMMON_VIDEO

CONTROLS

public static final ShellFolder CONTROLS

COOKIES

public static final ShellFolder COOKIES

DESKTOP

public static final ShellFolder DESKTOP

DESKTOPDIRECTORY

public static final ShellFolder DESKTOPDIRECTORY

DRIVES

public static final ShellFolder DRIVES

FAVORITES

public static final ShellFolder FAVORITES

FONTS

public static final ShellFolder FONTS

HISTORY

public static final ShellFolder HISTORY

INTERNET

public static final ShellFolder INTERNET

INTERNET_CACHE

public static final ShellFolder INTERNET_CACHE

LOCAL_APPDATA

public static final ShellFolder LOCAL_APPDATA

MYDOCUMENTS

public static final ShellFolder MYDOCUMENTS

MYMUSIC

public static final ShellFolder MYMUSIC

MYPICTURES

public static final ShellFolder MYPICTURES

MYVIDEO

public static final ShellFolder MYVIDEO

NETHOOD

public static final ShellFolder NETHOOD

NETWORK

public static final ShellFolder NETWORK

PERSONAL

public static final ShellFolder PERSONAL

PRINTERS

public static final ShellFolder PRINTERS

PROFILE

public static final ShellFolder PROFILE

PROFILES

public static final ShellFolder PROFILES

PROGRAM_FILES

public static final ShellFolder PROGRAM_FILES

PROGRAM_FILES_COMMON

public static final ShellFolder PROGRAM_FILES_COMMON

PROGRAMS

public static final ShellFolder PROGRAMS

RECENT

public static final ShellFolder RECENT

SEND_TO

public static final ShellFolder SEND_TO

START_MENU

public static final ShellFolder START_MENU

STARTUP

public static final ShellFolder STARTUP

SYSTEM

public static final ShellFolder SYSTEM

TEMPLATES

public static final ShellFolder TEMPLATES

WINDOWS

public static final ShellFolder WINDOWS

COMPUTER

public static final ShellFolder COMPUTER

NET_CONNECTIONS

public static final ShellFolder NET_CONNECTIONS
Method Detail

getFolderID

public int getFolderID()
Returns:
folder ID.

isVirtual

public boolean isVirtual()
Returns:
true, if the folder is virtual; otherwise false.

getAbsolutePath

public java.lang.String getAbsolutePath()
Returns absolute path of the shell folder. If the folder does not exist, returns empty string.

Returns:
absolute path of the shell folder.

getFolderIDList

public static Handle getFolderIDList(int folderID)
Retrieves ID list for the shell folder specified by folderID.

Parameters:
folderID - is a shell folder ID.
Returns:
handle to ID list.

getPathFromIDList

public static java.lang.String getPathFromIDList(Handle idList)
Retrieves absolute folder path from ID list.

Parameters:
idList - is a handle to ID list.
Returns:
absolute path retrieved from a specified ID list.

getSpecialFolderPath

public static java.lang.String getSpecialFolderPath(int folderID,
                                                    boolean create)
Retrieves absolute path of shell folder. If the folder specified by folderID is virtual, the returned path is empty.

Parameters:
folderID - shell folder ID.
create - flag to create a folder.
Returns:
absolute path of the shell folder.

getSpecialFolderPath

public static java.lang.String getSpecialFolderPath(int folderID)
Retrieves absolute path of the shell folder. If the folder specified by folderID is virtual, the returned path is empty.

Parameters:
folderID - shell folder ID.
Returns:
absolute path of the shell folder.

isFunctionalityAvailable

public static boolean isFunctionalityAvailable()
Returns true if the shell folder functionality is available for current operating system. The functionality is available for Windows 98 / 2000 / XP,
Windows NT 4.0 or Windows 95 (installed Microsoft Internet Explorer with Desktop Update).

Returns:
true, if the shell folder functionality is available for the current operating system.