CfbReader

Overview

CfbReader is a class in Aspose.Email FOSS for .NET. Inherits from: IDisposable.

CfbReader.CfbReader creates a reader from a byte array containing a CFB container.

Description

CfbReader is a class in the Aspose.Email FOSS library for .NET that exposes 11 methods and 13 properties for programmatic use. It extends IDisposable, inheriting shared functionality from its parent type.

The class also provides the Header property (provides the cfb file header information), the Difat property (contains the difat sector indices as a read‑only collection), the DirectoryEntries property (lists all directory entries in the container).

Instances are created through a single constructor that initializes the object with default values.

Properties

NameTypeAccessDescription
HeaderHeaderReadProvides the CFB file header information
DifatReadOnlyCollection<uint>ReadContains the DIFAT sector indices as a read‑only collection
FatReadOnlyCollection<uint>Read
MiniFatReadOnlyCollection<uint>Read
DirectoryEntriesReadOnlyCollection<DirectoryEntry>ReadLists all directory entries in the container
RootEntryDirectoryEntryReadRepresents the root storage directory entry
MiniStreambyte[]ReadHolds the raw bytes of the mini‑stream
MajorVersionintReadIndicates the major version number of the CFB format
SectorSizeintReadReturns the size in bytes of a standard sector
MiniSectorSizeintReadReturns the size in bytes of a mini sector
DirectoryEntryCountintReadReports the total number of directory entries
MaterializedStreamCountintReadReports how many streams have been materialized
FileSizeintReadGives the total size in bytes of the CFB file

Methods

SignatureDescription
CfbReader(data: byte[])Creates a reader from a byte array containing a CFB container
FromFile(path: string)Loads a CFB container from the specified file path
FromStream(stream: Stream)Loads a CFB container from the provided Stream
Dispose()Releases all resources used by the reader
GetEntry(streamId: uint)Returns the directory entry for the given stream identifier
GetStreamData(streamId: uint)Reads the raw byte data of the specified stream
IterStorages()Enumerates all storage entries in the CFB
IterStreams()Enumerates all stream entries in the CFB
IterChildren(storageStreamId: uint)Enumerates child entries of the given storage stream
IterTree(startStreamId: uint)Walks the directory tree starting at the given stream ID
FindChildByName(storageStreamId: uint, name: string)Finds a child entry by name within a storage
ResolvePath(names: IEnumerable<string>, startStreamId: uint)Resolves a sequence of names to a stream ID starting from a base

See Also