CfbDocument

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

SignatureDescription
CfbDocument()Creates a new CfbDocument instance.
CfbDocument(root: CfbStorage, majorVersion: ushort, minorVersion: ushort, transactionSignatureNumber: uint)Creates a new CfbDocument with the specified parameters.

Methods

SignatureDescription
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

NameTypeAccessDescription
RootCfbStorageReadThe root CfbStorage entry at stream ID 0; the starting point for all directory traversal.
MajorVersionushortReadCFB major version from the file header (3 for 512-byte sectors, 4 for 4096-byte sectors).
MinorVersionushortReadCFB minor version from the file header (always 0x003E per the specification).
TransactionSignatureNumberuintReadTransaction signature field from the CFB header; non-zero only in transacted files.

See Also