Interface used to access Libraries
Requires Windows 7 or later
-
Loads an existing library file
-
Initializes library from a known folder
-
Includes a folder in the library
-
Removes a folder
-
Retrieves a collection of folders in the library
-
Attempts to locate a folder that has been moved or renamed
-
Returns the default folder in which new items are saved
-
Sets the default save location
-
Retrieves library option flags
-
Sets library option flags
-
Retrieves the folder type of the library
-
Sets the folder type of the library
-
Returns the location of the library's icon
-
Sets the library icon
-
Saves changes (only if loaded from an existing library)
-
Saves the library to a specific location
-
Saves the library in a known folder
PyIShellLibrary.AddFolder
AddFolder(Location) Includes a folder
-
Location : PyIShellItem
Shell item interface representing the folder
PyIShellLibrary.Commit
Commit() Saves changes (only if loaded from an existing library)
PyIShellLibrary.GetDefaultSaveFolder
PyIShellItem = GetDefaultSaveFolder(Type, riid
) Returns the default folder in which new items are saved
-
Type=DSFT_DETECT : int
Specifies whether to return public or private save location, shellcon.DSFT_*
-
riid=IID_IShellItem : PyIID
The interface to return
PyIShellLibrary.GetFolderType
PyIID = GetFolderType() Returns the library type, shell.FOLDERTYPEID_*
PyIShellLibrary.GetFolders
PyIShellItemArray = GetFolders(Filter, riid
) Retrieves a collection of folders in the library
-
Filter=LFF_ALLITEMS : int
Specifies what types of folder to return (shellcon.LFF_*)
-
riid=IID_IShellItemArray : PyIID
The interface to return, IObjectCollection and IObjectArray also accepted.
PyIShellLibrary.GetIcon
str = GetIcon() Returns the location of the library's icon
Uses "module,resource" format
PyIShellLibrary.GetOptions
int = GetOptions() Retrieves library option flags
Returns a combination of shellcon.LOF_* flags
PyIShellLibrary.LoadLibraryFromItem
LoadLibraryFromItem(Library, Mode) Loads an existing library file
-
Library : PyIShellItem
Shell item interface representing the library file
-
Mode : int
Access mode, combination of storagecon.STGM_* flags
PyIShellLibrary.LoadLibraryFromKnownFolder
LoadLibraryFromKnownFolder(Library, Mode) Initializes library from a known folder
-
Library : PyIID
Known folder id, shell.FOLDERID_*
-
Mode : int
Access mode, combination of storagecon.STGM_* flags
PyIShellLibrary.RemoveFolder
RemoveFolder(Location) Removes a folder
-
Location : PyIShellItem
Shell item interface representing the folder
PyIShellLibrary.ResolveFolder
PyIShellItem = ResolveFolder(FolderToResolve, Timeout
, riid
) Attempts to locate a folder that has been moved or renamed
-
FolderToResolve : PyIShellItem
Library item whose location has changed
-
Timeout : int
Max search time, specified in milliseconds
-
riid=IID_IShellItem : PyIID
The interface to return
PyIShellLibrary.Save
PyIShellItem = Save(FolderToSaveIn, LibraryName
, Flags
) Saves the library to a specific location
-
FolderToSaveIn : PyIShellItem
The destination folder, use None to save in current user's Libraries folder
-
LibraryName : str
Filename for the new library, without file extension
-
Flags : int
Determines behaviour if file already exists, shellcon.LSF_*
Returns a shell item for the saved file.
PyIShellLibrary.SaveInKnownFolder
PyIShellItem = SaveInKnownFolder(FolderToSaveIn, LibraryName
, Flags
) Saves the library in a known folder
-
FolderToSaveIn : PyIID
The destination folder, shell.FOLDERID_*
-
LibraryName : str
Filename for the new library, without file extension
-
Flags : int
Determines behaviour if file already exists, shellcon.LSF_*
PyIShellLibrary.SetDefaultSaveFolder
SetDefaultSaveFolder(Type, SaveFolder) Sets the default save location
-
Type : int
Specifies public or private save location, shellcon.DSFT_*
-
SaveFolder : PyIShellItem
New default location, must be in the library
PyIShellLibrary.SetFolderType
SetFolderType(Type) Sets the folder type for the library
-
Type : PyIID
New type, shell.FOLDERTYPEID_*
PyIShellLibrary.SetIcon
SetIcon(Icon) Sets the library icon
-
Icon : str
Icon location in "module,resource" syntax
PyIShellLibrary.SetOptions
SetOptions(Mask, Options) Sets library option flags
-
Mask : int
Bitmask of flags to be changed, combination of shellcon.LOF_* values
-
Options : int
New options, combination of shellcon.LOF_* values