Skip to content

Latest commit

 

History

History
145 lines (74 loc) · 3.36 KB

PyIKnownFolder.md

File metadata and controls

145 lines (74 loc) · 3.36 KB

PyIKnownFolder

PyIKnownFolder Object

Interface representing a known folder that serves

as a replacement for the numeric CSIDL definitions and API functions.

Requires Vista or later.

Methods

PyIKnownFolder.GetCategory

int = GetCategory() Returns the category for a folder (shellcon.KF_CATEGORY_*)

PyIKnownFolder.GetFolderDefinition

dict = GetFolderDefinition() Retrieves detailed information about a known folder

Return Value

Returns a dict containing info from a KNOWNFOLDER_DEFINITION struct

PyIKnownFolder.GetFolderType

PyIID = GetFolderType() Returns the type of the folder

Return Value

Returns a folder type guid (shell.FOLDERTYPEID_*)

PyIKnownFolder.GetIDList

PyIDL = GetIDList(Flags) Returns the folder's location as an item id list.

Parameters

  • Flags : int

    Combination of shellcon.KF_FLAG_* values that affect how the operation is performed

PyIID = GetId() Returns the id of the folder

str = GetPath(Flags) Returns the path to the folder

Parameters

  • 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

Return Value

Combination of shellcon.KF_REDIRECTION_CAPABILITIES_* flags

PyIKnownFolder.GetShellItem

PyIShellItem = GetShellItem(Flags, riid

) Returns a shell interface for the folder

Parameters

  • Flags=0 : int

    Combination of shellcon.KF_FLAG_* values

  • riid=IID_IShellItem : PyIID

    The interface to return (IShellItem or IShellItem2)

SetPath(Flags, Path) Changes the location of the folder

Parameters

  • Flags : int

    KF_FLAG_DONT_UNEXPAND, or 0

  • Path : str

    New path for known folder