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

PropertyTypeDescription
namestrName of this stream entry as it appears in the CFB directory.
databytesRaw binary content of the stream.
clsidbytes16-byte CLSID associated with this stream entry, or 16 zero bytes if absent.
state_bitsintUser-defined state bits stored in the CFB directory entry.
creation_timeintCreation timestamp as a 64-bit Windows FILETIME value.
modified_timeintLast-modified timestamp as a 64-bit Windows FILETIME value.

See Also