ShlObj.KNOWN_FOLDER_FLAG (JNA API)
Description: declaration: package: com.sun.jna.platform.win32, interface: ShlObj, enum: KNOWN_FOLDER_FLAG

Package com.sun.jna.platform.win32

# Enum Class ShlObj.KNOWN_FOLDER_FLAG

java.lang.Object
java.lang.Enum<ShlObj.KNOWN_FOLDER_FLAG>
com.sun.jna.platform.win32.ShlObj.KNOWN_FOLDER_FLAG

All Implemented Interfaces:
  `Serializable`, `Comparable<ShlObj.KNOWN_FOLDER_FLAG>`, `Constable`

Enclosing interface:
  ShlObj

public static enum ShlObj.KNOWN_FOLDER_FLAG extends Enum<ShlObj.KNOWN_FOLDER_FLAG>
KnownFolder flags as used by SHGetKnownFolderPath, SHGetKnownFolderIDList and others. Microsoft Windows SDK 7.0A.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ALIAS_ONLY`
  Introduced in Windows 7.
  `CREATE`
  Forces the creation of the specified folder if that folder does not already exist.
  `DEFAULT_PATH`
  Gets the default path for a known folder.
  `DONT_UNEXPAND`
  Stores the full path in the registry without using environment strings.
  `DONT_VERIFY`
  Do not verify the folder's existence before attempting to retrieve the path or IDList.
  `INIT`
  Initializes the folder using its Desktop.ini settings.
  `NO_ALIAS`
  Gets the true system path for the folder, free of any aliased placeholders such as %USERPROFILE%, returned by SHGetKnownFolderIDList and IKnownFolder::GetIDList.
  `NO_APPCONTAINER_REDIRECTION`
  Introduced in Windows 7: When running inside an app container, or when providing an app container token, this flag prevents redirection to app container folders.
  `NONE`
  None
  `NOT_PARENT_RELATIVE`
  Gets the folder's default path independent of the current location of its parent.
  `SIMPLE_IDLIST`
  Build a simple IDList (PIDL) This value can be used when you want to retrieve the file system path but do not specify this value if you are retrieving the localized display name of the folder because it might not resolve correctly.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getFlag()`
  `static ShlObj.KNOWN_FOLDER_FLAG`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ShlObj.KNOWN_FOLDER_FLAG[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### NONE

    public static final ShlObj.KNOWN_FOLDER_FLAG NONE
    None

  - ### SIMPLE_IDLIST

    public static final ShlObj.KNOWN_FOLDER_FLAG SIMPLE_IDLIST
    Build a simple IDList (PIDL) This value can be used when you want to retrieve the file system path but do not specify this value if you are retrieving the localized display name of the folder because it might not resolve correctly.

  - ### NOT_PARENT_RELATIVE

    public static final ShlObj.KNOWN_FOLDER_FLAG NOT_PARENT_RELATIVE
    Gets the folder's default path independent of the current location of its parent. KF_FLAG_DEFAULT_PATH must also be set.

  - ### DEFAULT_PATH

    public static final ShlObj.KNOWN_FOLDER_FLAG DEFAULT_PATH
    Gets the default path for a known folder. If this flag is not set, the function retrieves the current-and possibly redirected-path of the folder. The execution of this flag includes a verification of the folder's existence unless KF_FLAG_DONT_VERIFY is set.

  - ### INIT

    public static final ShlObj.KNOWN_FOLDER_FLAG INIT
    Initializes the folder using its Desktop.ini settings. If the folder cannot be initialized, the function returns a failure code and no path is returned. This flag should always be combined with KF_FLAG_CREATE.

  - ### NO_ALIAS

    public static final ShlObj.KNOWN_FOLDER_FLAG NO_ALIAS
    Gets the true system path for the folder, free of any aliased placeholders such as %USERPROFILE%, returned by SHGetKnownFolderIDList and IKnownFolder::GetIDList. This flag has no effect on paths returned by SHGetKnownFolderPath and IKnownFolder::GetPath. By default, known folder retrieval functions and methods return the aliased path if an alias exists.

  - ### DONT_UNEXPAND

    public static final ShlObj.KNOWN_FOLDER_FLAG DONT_UNEXPAND
    Stores the full path in the registry without using environment strings. If this flag is not set, portions of the path may be represented by environment strings such as %USERPROFILE%. This flag can only be used with SHSetKnownFolderPath and IKnownFolder::SetPath.

  - ### DONT_VERIFY

    public static final ShlObj.KNOWN_FOLDER_FLAG DONT_VERIFY
    Do not verify the folder's existence before attempting to retrieve the path or IDList. If this flag is not set, an attempt is made to verify that the folder is truly present at the path. If that verification fails due to the folder being absent or inaccessible, the function returns a failure code and no path is returned. If the folder is located on a network, the function might take a longer time to execute. Setting this flag can reduce that lag time.

  - ### CREATE

    public static final ShlObj.KNOWN_FOLDER_FLAG CREATE
    Forces the creation of the specified folder if that folder does not already exist. The security provisions predefined for that folder are applied. If the folder does not exist and cannot be created, the function returns a failure code and no path is returned. This value can be used only with the following functions and methods:
    - SHGetKnownFolderPath
    - SHGetKnownFolderIDList
    - IKnownFolder::GetIDList
    - IKnownFolder::GetPath
    - IKnownFolder::GetShellItem

  - ### NO_APPCONTAINER_REDIRECTION

    public static final ShlObj.KNOWN_FOLDER_FLAG NO_APPCONTAINER_REDIRECTION
    Introduced in Windows 7: When running inside an app container, or when providing an app container token, this flag prevents redirection to app container folders. Instead, it retrieves the path that would be returned where it not running inside an app container.

  - ### ALIAS_ONLY

    public static final ShlObj.KNOWN_FOLDER_FLAG ALIAS_ONLY
    Introduced in Windows 7. Return only aliased PIDLs. Do not use the file system path.

- ## Method Details

  - ### values

    public static ShlObj.KNOWN_FOLDER_FLAG[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static ShlObj.KNOWN_FOLDER_FLAG valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getFlag

    public int getFlag()