public abstract class Shell32Util
extends java.lang.Object
Constructor and Description |
---|
Shell32Util() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getFolderPath(int nFolder)
Get a special folder path.
|
static java.lang.String |
getFolderPath(WinDef.HWND hwnd,
int nFolder,
WinDef.DWORD dwFlags)
Get a special folder path.
|
static java.lang.String |
getKnownFolderPath(Guid.GUID guid)
Retrieves the full path of a known folder identified by the folder's KNOWNFOLDERID.
|
static java.lang.String |
getSpecialFolderPath(int csidl,
boolean create)
Retrieves the path of a special folder, identified by its CSIDL.
|
public static java.lang.String getFolderPath(WinDef.HWND hwnd, int nFolder, WinDef.DWORD dwFlags)
hwnd
- Parent window.nFolder
- Folder CSLID.dwFlags
- Flags.public static java.lang.String getFolderPath(int nFolder)
nFolder
- Folder CSLID.public static java.lang.String getKnownFolderPath(Guid.GUID guid) throws Win32Exception
getFolderPath(com.sun.jna.platform.win32.WinDef.HWND, int, com.sun.jna.platform.win32.WinDef.DWORD)
. That older function is now simply a wrapper for getKnownFolderPathguid
- the KNOWNFOLDERS GUID as defined in KnownFolders
Win32Exception
- if the guid references a KNOWNFOLDERID which does not have a path (such as a folder marked
as KF_CATEGORY_VIRTUAL) or that the KNOWNFOLDERID is not present on the system. Not all KNOWNFOLDERID values are
present on all systems.public static final java.lang.String getSpecialFolderPath(int csidl, boolean create)
csidl
- A CSIDL that identifies the folder of interest. If a virtual folder is specified, this function will fail.create
- Indicates whether the folder should be created if it does not already exist. If this value is nonzero, the folder is created. If this value is
zero, the folder is not created.