ConversionInventory.h header

#include <ew/app/ConversionInventory.h>

Namespace ew::app

ConversionInventory struct

struct ew::app::ConversionInventory

The classified recursive inventory of a source folder.

Members

QString ew::app::ConversionInventory::rootPath

The scanned root (absolute).

std::vector<InventoryFile> ew::app::ConversionInventory::files

Every non-hidden file, sorted by relative path for deterministic downstream stages.

int ew::app::ConversionInventory::countOf(ConversionFileKind kind) const

How many files carry kind.

InventoryFile struct

struct ew::app::InventoryFile

One file of the source folder, classified.

Members

QString ew::app::InventoryFile::relativePath

Forward-slash path relative to the scanned root.

ConversionFileKind ew::app::InventoryFile::kind =

The routing classification.

qint64 ew::app::InventoryFile::sizeBytes = 0

File size in bytes (stage chunking uses it).

bool ew::app::InventoryFile::operator==(const InventoryFile &) const =default

Compares every field for equality.

Enumerations

enum class ConversionFileKind { ProseDocument, Screenplay, Image, MapImage, Spreadsheet, Pdf, ConlangList, StatBlock, RollTable, TaskList, Bibliography, ChronologyNotes, Unknown }

What a source file most likely holds, decided WITHOUT AI (extension first, then filename hints, then a light content sniff) – the routing signal the AI folder conversion's stages use to pick which files feed which extraction (docs/AI_FOLDER_CONVERSION.md §2). The classifier is deliberately conservative: a wrong specific kind costs more than Unknown or ProseDocument, because every stage re-reads its inputs and nothing is ever silently dropped.

Functions

ConversionFileKind ew::app::classifyConversionFile(const QString &relativePath, const QByteArray &contentHead)

Classifies one file from its relativePath and the first few KB of its content (contentHead; pass empty for binary/unreadable files – extension and name hints still apply). Pure and deterministic; see ConversionFileKind for the priority order.

ConversionInventory ew::app::scanConversionFolder(const QString &folder)

Scans folder recursively (skipping dot-files/dot-folders, exactly like the bundle pack) into a classified inventory. A missing folder yields an empty inventory with rootPath unset.