powcshell.shellitem2 module

powcshell.shellitem2 module#

プロパティにアクセスしやすいシェル項目。

主なクラスは ShellItem2 です。

class powcshell.shellitem2.IShellItem2#

ベースクラス: IShellItem

GetBool = <COM method offset 20: WinFunctionType>#
GetCLSID = <COM method offset 14: WinFunctionType>#
GetFileTime = <COM method offset 15: WinFunctionType>#
GetInt32 = <COM method offset 16: WinFunctionType>#
GetProperty = <COM method offset 13: WinFunctionType>#
GetPropertyDescriptionList = <COM method offset 11: WinFunctionType>#
GetPropertyStore = <COM method offset 8: WinFunctionType>#
GetPropertyStoreForKeys = <COM method offset 10: WinFunctionType>#
GetPropertyStoreWithCreateObject = <COM method offset 9: WinFunctionType>#
GetString = <COM method offset 17: WinFunctionType>#
GetUInt32 = <COM method offset 18: WinFunctionType>#
GetUInt64 = <COM method offset 19: WinFunctionType>#
Update = <COM method offset 12: WinFunctionType>#
class powcshell.shellitem2.ShellItem2(o: Any)#

ベースクラス: ShellItem

シェル項目。IShellItem2インターフェイスのラッパーです。

注釈

__iter__、parent等でIShellItemが必要な場合は以下のコードでShellItemを作成してください。

>>> from powc.core import queryinterface
>>> item = ShellItem(queryinterface(item2.wrapped_obj, IShellItem))
static create_from_idlist(pidl: int) ShellItem2#

アイテムIDリストからシェルアイテムを作成します。

static create_from_idlist_nothrow(pidl: int) ComResult[ShellItem2]#

アイテムIDリストからシェルアイテムを作成します。

static create_knownfolder(folder_id: GUID, flags: int = 0) ShellItem2#
static create_knownfolder_item(folder_id: GUID, itemname: str, flags: int = 0) ShellItem2#
static create_knownfolder_item_nothrow(folder_id: GUID, itemname: str, flags: int = 0) ComResult[ShellItem2]#

既知フォルダ内のシェル項目を作成します。

パラメータ:
  • folder_id (GUID) -- KnownFolderID定数。

  • itemname (str) -- 項目の名前。

  • flags (int, optional) -- フラグ。

static create_knownfolder_nothrow(folder_id: GUID, flags: int = 0) ComResult[ShellItem2]#

既知フォルダのシェルアイテムを作成します。

パラメータ:
  • folder_id (GUID) -- KnownFolderID定数。

  • flags (int, optional) -- フラグ. Defaults to 0.

static create_parsingname(name: str | PathLike) ShellItem2#

解析名からシェルアイテムを作成します。

static create_parsingname_nothrow(name: str | PathLike) ComResult[ShellItem2]#

解析名からシェルアイテムを作成します。

get_bool(key: PropertyKey) bool#

キーに対応する真偽値を取得します。

get_bool_nothrow(key: PropertyKey) ComResult[bool]#

キーに対応する真偽値を取得します。

get_clsid(key: PropertyKey) GUID#

キーに対応するCLSIDを取得します。

get_clsid_nothrow(key: PropertyKey) ComResult[GUID]#

キーに対応するCLSIDを取得します。

get_filetime(key: PropertyKey) FILETIME#

キーに対応するFILETIMEを取得します。

get_filetime_nothrow(key: PropertyKey) ComResult[FILETIME]#

キーに対応するFILETIMEを取得します。

get_int32(key: PropertyKey) int#

キーに対応する32ビット符号付き整数を取得します。

get_int32_nothrow(key: PropertyKey) ComResult[int]#

キーに対応する32ビット符号付き整数を取得します。

get_prop(key: PropertyKey) PropVariant#

キーに対応するプロパティを取得します。

get_prop_nothrow(key: PropertyKey) ComResult[PropVariant]#

キーに対応するプロパティを取得します。

get_propdescs(key: PropertyKey) PropertyDescriptionList#

プロパティの説明を取得します。

get_propdescs_nothrow(key: PropertyKey) ComResult[PropertyDescriptionList]#

プロパティの説明を取得します。

get_propstore(flags: GetPropertyStoreFlag) PropertyStore#

プロパティストアを取得します。

get_propstore_nothrow(flags: GetPropertyStoreFlag) ComResult[PropertyStore]#

プロパティストアを取得します。

get_str(key: PropertyKey) str#

キーに対応する文字列を取得します。

get_str_nothrow(key: PropertyKey) ComResult[str]#

キーに対応する文字列を取得します。

get_uint32(key: PropertyKey) int#

キーに対応する32ビット符号無し整数を取得します。

get_uint32_nothrow(key: PropertyKey) ComResult[int]#

キーに対応する32ビット符号無し整数を取得します。

get_uint64(key: PropertyKey) int#

キーに対応する64ビット符号無し整数を取得します。

get_uint64_nothrow(key: PropertyKey) ComResult[int]#

キーに対応する64ビット符号無し整数を取得します。

property items: tuple[ShellItem2, ...]#

フォルダ内の項目を列挙します。

iter_items() Iterator[ShellItem2]#

フォルダ内の項目を列挙します。

property linktarget: ShellItem2#
property linktarget_nothrow: ComResult[ShellItem2]#

項目がシェルリンクの場合にリンク先項目を取得します。

property parent: ShellItem2#

親フォルダを取得します。

property parent_nothrow: ComResult[ShellItem2]#

親フォルダを取得します。

property propstore: PropertyStore#

既定のプロパティストアを取得します。

property propstore_nothrow: ComResult[PropertyStore]#

既定のプロパティストアを取得します。

property propstore_with_slowitem: PropertyStore#

遅い項目を含むプロパティストアを取得します。

property propstore_with_slowitem_nothrow: ComResult[PropertyStore]#

遅い項目を含むプロパティストアを取得します。