Skip to main content

read_declared_files

Function read_declared_files 

Source
pub fn read_declared_files(
    parsed: &[ParsedFile],
    folder: &AssetFolder,
    errors: &mut ErrorSink,
) -> BTreeMap<String, Vec<u8>>
Expand description

The bytes of every declared asset file in folder, keyed by normalised path — read through the folder’s reader once each, and only for a file a declaration names, so a large file nothing declares is never read. A declaration whose path fails path_errors or names no listed file is skipped (phase_asset_files reports the latter); a listed file the reader fails on is bynk.asset.unreadable_file, and is left out.