Expand description
Import settings (ADR-0057): how one file, or every file of a folder, is
read or baked. A file’s own settings are beside it, its full name kept
(images/hero.png.meta); a folder’s defaults are in its
_folder.meta, for every file in it and below it. A settings file is
RON, a struct of sections, each read by the step it is named after:
(onebit: (dither: bayer), indexed: (group: "ui")).
A section is a type that implements ImportSettings, registered in a
Formats at start-up
(register_import_settings).
A format reads its section with
DecodeCx::import_settings: from
the nearest file of the chain that has it (settings_chain), whole,
or its Default when none does.
check_import_settings checks
every settings file of a bundle against the registered sections.
No format may claim meta, so the walkers over a folder never read a
settings file as an asset.
Constants§
- FOLDER_
SETTINGS - The name of a folder’s settings file: the defaults of every file in the folder and below it.
- SETTINGS_
EXTENSION - The extension of a settings file, which no format may claim.
Traits§
- Import
Settings - A section of a settings file: a struct the step named
SECTIONreads (onebit,indexed), never named after a file format.
Functions§
- is_
settings_ file - Whether the file at
pathis a settings file: its extension isSETTINGS_EXTENSION(in any case). - settings_
chain - The settings files the file at
filereads a section from, nearest first: its own (settings_of), then theFOLDER_SETTINGSof its folder and of each folder above it, up to the root. - settings_
of - The path of the settings file of the file at
file:images/hero.pnghasimages/hero.png.meta.