CFBStream
Overview
CFBStream is a mutable STREAM_OBJECT node that stores raw binary data within a CFBDocument or CFBStorage. It exposes the metadata fields defined by the CFB specification and allows the data payload to be set freely before the document is serialized via CFBWriter.
from aspose.email_foss.cfb import CFBDocument, CFBStream, CFBWriter
doc = CFBDocument.from_file("archive.cfb")
s = CFBStream()
s.name = "NewData"
s.data = b"\x01\x02\x03"
doc.root.children.append(s)
CFBWriter.write_file(doc, "updated.cfb")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; defaults to b"". |
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 | FileTime | Creation timestamp as a FileTime value. |
modified_time | FileTime | Last-modified timestamp as a FileTime value. |