Expand description
General utilities for file I/O, path handling, and data serialisation.
Functions§
- copy_
to_ staging - Copy a file from the input tree into the staging directory, preserving its relative path.
- normalize_
id - Convert a directory/file name into a safe alphanumeric ID for use as a pack identifier. E.g. “Stranded II” → “stranded_ii”, “MyMod-v1!” → “mymod_v1”.
- parse_
inf_ file - Parse an .inf file, handling non-UTF-8 encodings gracefully.
- read_
file_ lossy - Read a file to String, trying UTF-8 first, falling back to Latin-1 (ISO-8859-1) which maps bytes 128-255 directly to Unicode codepoints U+0080–U+00FF.
- relative_
path - Compute the relative path of a file within the input tree.
- write_
ron - Serialize data to RON and write to path.