powc.stream module

目次

powc.stream module#

IStreamラッパー。

class powc.stream.ComStorageStat(name: str | None, type: int, size: int, mtime: datetime.datetime, ctime: datetime.datetime, atime: datetime.datetime, mode: int, locks_supported: int, clsid: comtypes.GUID.GUID, statebits: int, reserved: int)#

ベースクラス: object

atime: datetime#
clsid: GUID#
ctime: datetime#
locks_supported: int#
mode: int#
mtime: datetime#
name: str | None#
reserved: int#
size: int#
statebits: int#
type: int#
class powc.stream.ComStream(o: Any)#

ベースクラス: object

COMストリーム。IStreamインターフェイスのラッパーです。

class BytesAndSize(array: bytes, size: int)#

ベースクラス: object

array: bytes#
size: int#
clone() ComStream#
clone_nothrow() ComResult[ComStream]#
commit(flags: StorageCommit | int) None#
commit_nothrow(flags: StorageCommit | int) ComResult[None]#
static create_on_file(path: str, mode: StorageMode | int, creates: bool) ComStream#
static create_on_file_nothrow(path: str, mode: StorageMode | int, creates: bool) ComResult[ComStream]#
static create_on_mem(buffer: Buffer) ComStream#
static create_on_mem_nothrow(buffer: Buffer) ComResult[ComStream]#
get_stat(flags: StatFlag | int) ComStorageStat#
get_stat_nothrow(flags: StatFlag | int) ComResult[ComStorageStat]#
keep_pos() Generator[None, None, None]#
lock_region(offset: int, size: int, locktype: LockType | int) None#
lock_region_nothrow(offset: int, size: int, locktype: LockType | int) ComResult[None]#
static openread_on_file(path: str) ComStream#
static openread_on_file_nothrow(path: str) ComResult[ComStream]#
property pos: int#
property pos_nothrow: ComResult[int]#
read_bytes(size: int) BytesAndSize#
read_bytes_all() bytes#
read_bytes_nothrow(size: int) ComResult[BytesAndSize]#
revert() None#
revert_nothrow() ComResult[None]#
seek(move: int, origin: StreamSeek | int) int#
seek_nothrow(move: int, origin: StreamSeek | int) ComResult[int]#
set_pos_nothrow(pos: int) ComResult[int]#
set_size_nothrow(size: int) ComResult[None]#
property size: int#
property size_nothrow: ComResult[int]#
property stat: ComStorageStat#
property stat_nothrow: ComResult[ComStorageStat]#
unlock_region(offset: int, size: int, locktype: LockType | int) None#
unlock_region_nothrow(offset: int, size: int, locktype: LockType | int) ComResult[None]#
property wrapped_obj: c_void_p#
write_bytes(data) int#
write_bytes_nothrow(data: Buffer) ComResult[int]#
class powc.stream.ISequentialStream#

ベースクラス: IUnknown

Read = <COM method offset 3: WinFunctionType>#
Write = <COM method offset 4: WinFunctionType>#
class powc.stream.IStream#

ベースクラス: ISequentialStream

Clone = <COM method offset 13: WinFunctionType>#
Commit = <COM method offset 8: WinFunctionType>#
CopyTo = <COM method offset 7: WinFunctionType>#
LockRegion = <COM method offset 10: WinFunctionType>#
Revert = <COM method offset 9: WinFunctionType>#
Seek = <COM method offset 5: WinFunctionType>#
SetSize = <COM method offset 6: WinFunctionType>#
Stat = <COM method offset 12: WinFunctionType>#
UnlockRegion = <COM method offset 11: WinFunctionType>#
class powc.stream.LockType(*values)#

ベースクラス: IntFlag

LOCKTYPE

LOCK_EXCLUSIVE = 2#
LOCK_ONLYONCE = 4#
LOCK_WRITE = 1#
class powc.stream.StatFlag(*values)#

ベースクラス: IntEnum

STATFLAG

DEFAULT = 0#
NONAME = 1#
class powc.stream.StorageCommit(*values)#

ベースクラス: IntFlag

STGC

CONSOLIDATE = 8#
DANGEROUSLYCOMMITMERELYTODISKCACHE = 4#
DEFAULT = 0#
ONLYIFCURRENT = 2#
OVERWRITE = 1#
class powc.stream.StorageMode(*values)#

ベースクラス: IntFlag

STGM

CONVERT = 131072#
CREATE = 4096#
DELETEONRELEASE = 67108864#
DIRECT = 0#
DIRECT_SWMR = 4194304#
FAILIFTHERE = 0#
NOSCRATCH = 1048576#
NOSNAPSHOT = 2097152#
PRIORITY = 262144#
READ = 0#
READWRITE = 2#
SHARE_DENY_NONE = 64#
SHARE_DENY_READ = 48#
SHARE_DENY_WRITE = 32#
SHARE_EXCLUSIVE = 16#
SIMPLE = 134217728#
TRANSACTED = 65536#
WRITE = 1#
class powc.stream.StorageType(*values)#

ベースクラス: IntEnum

STGTY

LOCKBYTES = 3#
PROPERTY = 4#
STORAGE = 1#
STREAM = 2#
class powc.stream.StreamSeek(*values)#

ベースクラス: IntEnum

STREAM_SEEK

CUR = 1#
END = 2#
SET = 0#