Overview
CfbDocument represents an in-memory Compound File Binary document. Use the static factory methods FromFile, FromStream, or FromReader to open an existing CFB file, or call the full constructor to create a new document from a CfbStorage root. The Root property gives access to the top-level storage, from which you can navigate the entire directory tree.
Constructors
| Signature | Description |
|---|
CfbDocument() | Creates a new CfbDocument instance. |
CfbDocument(root: CfbStorage, majorVersion: ushort, minorVersion: ushort, transactionSignatureNumber: uint) | Creates a new CfbDocument with the specified parameters. |
Methods
| Signature | Description |
|---|
FromReader(reader: CfbReader) | Creates a CfbDocument by reading all entries from an open CfbReader instance. |
FromFile(path: string) | Opens the CFB file at path and returns a new CfbDocument. |
FromStream(stream: Stream) | Reads a CFB document from stream and returns a new CfbDocument. |
Properties
| Name | Type | Access | Description |
|---|
Root | CfbStorage | Read | The root CfbStorage entry at stream ID 0; the starting point for all directory traversal. |
MajorVersion | ushort | Read | CFB major version from the file header (3 for 512-byte sectors, 4 for 4096-byte sectors). |
MinorVersion | ushort | Read | CFB minor version from the file header (always 0x003E per the specification). |
TransactionSignatureNumber | uint | Read | Transaction signature field from the CFB header; non-zero only in transacted files. |
See Also