CfbReader

Vue de l’ensemble

‘CfbReader’ est un parzer de bas niveau, seulement lisible pour les fichiers binaires Compound File. Construisez-le via ‘FromFile’ ou ‘FromStream’, puis navigez sur l’arbre de directoire avec ‘IterStorages’, ‘IterStreams’, `Itchildren’ et ’ FindChildByName’. Utilisez ‘GetStreumData’ pour lire des bytes crus d’un courant appelé. Implémentations ‘IDisposable’; utilisez toujours dans un bloc ‘utiliser’ afin de libérer les manuels de fichier.

constructeurs

SignatureDescription
CfbReader(data: byte[])Creates a new CfbReader with the specified parameters.

méthodes

SignatureDescription
FromFile(path: string)Opens the CFB file at path and returns a new CfbReader.
FromStream(stream: Stream)Reads a CFB file from stream and returns a new CfbReader.
Dispose()Releases any file handle or stream held by this reader.
GetEntry(streamId: uint)Returns the DirectoryEntry for the given streamId.
GetStreamData(streamId: uint)Returns the raw byte content of the stream identified by streamId.
IterStorages()Yields all storage-type directory entries in tree order.
IterStreams()Yields all stream-type directory entries in tree order.
IterChildren(storageStreamId: uint)Yields direct child entries of the storage identified by storageStreamId.
IterTree(startStreamId: uint)Yields all entries in the subtree rooted at startStreamId (depth-first).
FindChildByName(storageStreamId: uint, name: string)Returns the stream ID of the direct child of storageStreamId whose name equals name, or null if not found.
ResolvePath(names: IEnumerable<string>, startStreamId: uint)Walks a sequence of names starting from startStreamId and returns the stream ID of the final entry.

Propriétés

NameTypeAccessDescription
HeaderHeaderReadThe parsed CFB file header; exposes sector-size fields.
DifatReadOnlyCollection<uint>ReadRead-only view of the DIFAT sector chain.
FatReadOnlyCollection<uint>ReadRead-only view of the FAT (file allocation table) sector chain.
MiniFatReadOnlyCollection<uint>ReadRead-only view of the FAT (file allocation table) sector chain.
DirectoryEntriesReadOnlyCollection<DirectoryEntry>ReadAll 128-byte directory entries parsed from the directory sectors, in raw order.
RootEntryDirectoryEntryReadThe root directory entry (stream ID 0).
MiniStreambyte[]ReadRaw bytes of the mini-stream container (the data stream of the root entry).
MajorVersionintReadCFB major version parsed from the file header.
SectorSizeintReadSector size in bytes (512 for v3, 4096 for v4).
MiniSectorSizeintReadSector size in bytes (512 for v3, 4096 for v4).
DirectoryEntryCountintReadTotal number of directory entry records in the directory sectors.
MaterializedStreamCountintReadNumber of streams with non-empty data in the parsed document.
FileSizeintReadTotal size of the source file or stream in bytes.

Voir aussi

 Français