MsgStream
Overview
MsgStream is the leaf node in an MsgDocument tree. It stores the raw binary payload of a single CFB stream entry together with its directory metadata (name, CLSID, state bits, and timestamps). Instances are obtained via MsgStorage.add_stream(), MsgStorage.find_stream(), or by iterating MsgStorage.iter_streams(). The data attribute can be read or replaced directly to modify stream content before saving.
from aspose.email_foss.msg import MsgDocument
doc = MsgDocument.from_file("message.msg")
stream = doc.root.find_stream("__properties_version1.0")
if stream:
print(f"property stream size: {len(stream.data)}")Properties
| Property | Type | Description |
|---|---|---|
name | str | Name of this stream entry as it appears in the CFB directory. |
data | bytes | Raw binary content of the stream. |
clsid | bytes | 16-byte CLSID associated with this stream entry, or 16 zero bytes if absent. |
state_bits | int | User-defined state bits stored in the CFB directory entry. |
creation_time | int | Creation timestamp as a 64-bit Windows FILETIME value. |
modified_time | int | Last-modified timestamp as a 64-bit Windows FILETIME value. |