Interface representing a known folder that serves
as a replacement for the numeric CSIDL definitions and API functions.
Requires Vista or later.
-
Returns the id of the folder
-
Returns the category for a folder (shellcon.KF_CATEGORY_*)
-
Returns a shell interface for the folder
-
Returns the path to the folder
-
Changes the location of the folder
-
Returns the folder's location as an item id list
-
Returns the type of the folder
-
Returns flags indicating how the folder can be redirected
-
Retrieves detailed information about a known folder
PyIKnownFolder.GetCategory
int = GetCategory() Returns the category for a folder (shellcon.KF_CATEGORY_*)
PyIKnownFolder.GetFolderDefinition
dict = GetFolderDefinition() Retrieves detailed information about a known folder
Returns a dict containing info from a KNOWNFOLDER_DEFINITION struct
PyIKnownFolder.GetFolderType
PyIID = GetFolderType() Returns the type of the folder
Returns a folder type guid (shell.FOLDERTYPEID_*)
PyIKnownFolder.GetIDList
PyIDL = GetIDList(Flags) Returns the folder's location as an item id list.
-
Flags : int
Combination of shellcon.KF_FLAG_* values that affect how the operation is performed
PyIKnownFolder.GetId
PyIID = GetId() Returns the id of the folder
PyIKnownFolder.GetPath
str = GetPath(Flags) Returns the path to the folder
-
Flags=0 : int
Combination of shellcon.KF_FLAG_* flags controlling how the path is returned
PyIKnownFolder.GetRedirectionCapabilities
int = GetRedirectionCapabilities() Returns flags indicating how the folder can be redirected
Combination of shellcon.KF_REDIRECTION_CAPABILITIES_* flags
PyIKnownFolder.GetShellItem
PyIShellItem = GetShellItem(Flags, riid
) Returns a shell interface for the folder
-
Flags=0 : int
Combination of shellcon.KF_FLAG_* values
-
riid=IID_IShellItem : PyIID
The interface to return (IShellItem or IShellItem2)
PyIKnownFolder.SetPath
SetPath(Flags, Path) Changes the location of the folder
-
Flags : int
KF_FLAG_DONT_UNEXPAND, or 0
-
Path : str
New path for known folder