Vue de l’ensemble
‘CfbWriter’ sérialisera un ‘File de fichier’ dans un fichie binaire composé valide. appeler ‘ToBytes’ pour obtenir le contenu séries en tant que bande-byte, ou ‘WriteFale’ à écrire directement sur le disque. La méthode interne ‘Serialize’ construit les secteurs FAT, DIFAT et mini-FAT selon la spécification MS-CFB. Les constructeurs sont utilisés internellement par l’auteur pour représenter les registres d’entrée et les chaînes du secteur.
constructeurs
| Signature | Description |
|---|
Serializer(document: CfbDocument) | Creates a new CfbWriter with the specified parameters. |
EntryRecord(streamId: uint, name: string, objectType: DirectoryObjectType, clsid: byte[], stateBits: uint, creationTime: ulong, modifiedTime: ulong) | Creates a new CfbWriter with the specified parameters. |
Chain(payload: byte[]) | Creates a new CfbWriter with the specified parameters. |
méthodes
| Signature | Description |
|---|
ToBytes(document: CfbDocument) | Serializes document to a CFB-compliant byte array. |
WriteFile(document: CfbDocument, path: string) | Serializes document and writes it to the file at path. |
Serialize() | Performs the internal CFB layout: allocates FAT sectors, builds directory entries, and returns the complete binary. |
Propriétés
| Name | Type | Access | Description |
|---|
StreamId | uint | Read | Zero-based directory index assigned to this entry record. |
Name | string | Read | UTF-16LE entry name as it will appear in the CFB directory. |
ObjectType | DirectoryObjectType | Read | The DirectoryObjectType value encoded in this entry’s object-type byte. |
Clsid | byte[] | Read | 16-byte CLSID written to this entry’s CLSID field. |
StateBits | uint | Read | Application-defined state bits written to this entry. |
CreationTime | ulong | Read | Creation timestamp (FILETIME) written to this entry. |
ModifiedTime | ulong | Read | Modification timestamp (FILETIME) written to this entry. |
StreamData | byte[] | Read | Payload bytes for stream-type entries (empty for storage-type entries). |
Children | List<EntryRecord> | Read | Ordered list of child EntryRecord entries for storage-type nodes. |
ColorFlag | DirectoryColorFlag | Read | Red-black tree color written to this entry’s directory record. |
LeftSiblingId | uint | Read | Stream ID of the left sibling in the red-black tree. |
RightSiblingId | uint | Read | Stream ID of the right sibling in the red-black tree. |
ChildId | uint | Read | Stream ID of the first child entry (for storage-type nodes). |
StartingSectorLocation | uint | Read | First FAT sector index for this stream’s data. |
StreamSize | ulong | Read | Size in bytes of the stream’s data payload. |
IsRoot | bool | Read | True if this entry is the root storage entry (stream ID 0). |
IsStorage | bool | Read | True if this entry is a storage container. |
IsStream | bool | Read | True if this entry is a data stream. |
Payload | byte[] | Read | The complete serialized bytes of this entry (used internally by the chain builder). |
Sectors | List<uint> | Read | Ordered list of FAT sector indices allocated to this entry’s data. |
FirstSector | uint | Read | Index of the first FAT sector allocated to this entry’s data. |
Voir aussi