Click or drag to resize

KNOWN_FOLDER_FLAG Enumeration

Specify special retrieval options for known folders. These values supersede CSIDL values, which have parallel meanings. Maps to Windows' KNOWN_FOLDER_FLAG enumeration..

Namespace:  ShellBoost.Core.WindowsShell
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
[FlagsAttribute]
public enum KNOWN_FOLDER_FLAG
Members
  Member nameValueDescription
KF_FLAG_DEFAULT0 No flags.
KF_FLAG_FORCE_APP_DATA_REDIRECTION524288 Introduced in Windows 10, version 1709. When called from a packaged app, LocalAppData/RoamingAppData folders are redirected to private app locations that match the paths returned from Windows.Storage.ApplicationData.Current{LocalFolder|RoamingFolder}. Other folders are redirected to subdirectories of LocalAppData. This flag is used with FOLDERID_AppDataDesktop, FOLDERID_AppDataDocuments, FOLDERID_AppDataFavorites, and FOLDERID_AppDataProgramData. It is also intended for compatibility with .NET applications, and not meant to be used directly from an application.
KF_FLAG_RETURN_FILTER_REDIRECTION_TARGET262144Introduced in Windows 10, version 1703. When running in a Desktop Bridge process, some file system locations are redirected to package-specific locations by the file system. This flag will cause the target of the direction to be returned for those locations. This is useful in cases where the real location within the file system needs to be known.
KF_FLAG_FORCE_PACKAGE_REDIRECTION131072Introduced in Windows 10, version 1703. When running inside an AppContainer process, or when providing an AppContainer token, some folders are redirected to AppContainer-specific locations within the package. This flag will force with redirection for folders that are not normally redirected for the purposes of Desktop Bridge processes, and can be used for sharing files between UWA and Desktop Bridge apps within the same package. This flag is functionally identical to KF_FLAG_FORCE_APPCONTAINER_REDIRECTION.
KF_FLAG_NO_PACKAGE_REDIRECTION65536Introduced in Windows 10, version 1703. When running inside a packaged process (such as a Desktop Bridge app or an AppContainer), or when providing a packaged process token, some folders are redirected to package-specific locations. This flag disables redirection on locations where it is applied, and instead returns the path that would be returned were it not running inside a packaged process. This flag is functionally identical to KF_FLAG_NO_APPCONTAINER_REDIRECTION.
KF_FLAG_FORCE_APPCONTAINER_REDIRECTION131072Introduced in Windows 8. This flag is functionally identical to KF_FLAG_FORCE_PACKAGE_REDIRECTION, and was deprecated in Windows 10, version 1703.
KF_FLAG_NO_APPCONTAINER_REDIRECTION65536Introduced in Windows 8. This flag is functionally identical to KF_FLAG_NO_PACKAGE_REDIRECTION and was deprecated in Windows 10, version 1703.
KF_FLAG_CREATE32768 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.
KF_FLAG_DONT_VERIFY16384 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.
KF_FLAG_DONT_UNEXPAND8192 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.
KF_FLAG_NO_ALIAS4096 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.
KF_FLAG_INIT2048 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. If the folder is located on a network, the function might take a longer time to execute.
KF_FLAG_DEFAULT_PATH1024 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.
KF_FLAG_NOT_PARENT_RELATIVE512 Gets the folder's default path independent of the current location of its parent. KF_FLAG_DEFAULT_PATH must also be set.
KF_FLAG_SIMPLE_IDLIST256 Build a simple 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.
KF_FLAG_ALIAS_ONLY-2147483648Introduced in Windows 7. Return only aliased PIDLs. Do not use the file system path.
See Also