Skip to main contentModule utils
Source - RomGroup
- One game entry for list display: same
name on the same platform (base + updates/DLC) shown once.
- format_size
- Human-readable file size.
- format_size_with_breakdown
- Human-readable total size, optionally with a per-category breakdown from
Rom::files. - group_roms_by_name
- Group ROMs by game name and platform; primary is the “base” file (prefer over
"[Update]" / "[DLC]" tags in fs_name when present). - sanitize_filename
- Make a filename safe for the local filesystem.
- size_breakdown_by_category
- Group a Rom’s files by category and return ordered
(label, total_bytes) pairs. - truncate
- Truncate a string to
max chars, appending “…” if trimmed.