DirectoryObjectType

DirectoryObjectType

Overview

DirectoryObjectType is an IntEnum that represents the type byte stored in a CFB directory entry record. Every DirectoryEntry returned by CFBReader carries an object_type field of this type, allowing callers to distinguish root entries, storage containers, and data streams without inspecting raw bytes.

from aspose.email_foss.cfb import CFBReader, DirectoryObjectType

with CFBReader.from_file("archive.cfb") as reader:
    for entry in reader.iter_storages():
        if entry.object_type == DirectoryObjectType.STORAGE_OBJECT:
            print(f"storage: {entry.name}")

Values

ValueDescription
UNKNOWN_OR_UNALLOCATED = 0Unknown or unallocated directory entry.
STORAGE_OBJECT = 1Storage container entry (analogous to a directory).
STREAM_OBJECT = 2Stream data entry (analogous to a file).
ROOT_STORAGE_OBJECT = 5Root storage entry; exactly one exists per CFB document.

See Also