Skip to main content

Module config

Module config 

Source
Expand description

Path utilities and persistent app configuration.

The save-folder path and backup root are persisted to app.ini under the platform config directory so they survive between sessions. The disclaimer acceptance is tracked via a sentinel file in the same directory.

The backup root defaults to ~/NotAlterra and can be changed via the Set backup location menu item.

Structs§

AppConfig
Session-lifetime configuration loaded from and persisted to app.ini.

Statics§

BACKUP_ROOT 🔒
Custom backup root directory, set via the Set backup location menu. When None, falls back to exe_dir().join("backups").

Functions§

accept_disclaimer
Create the disclaimer sentinel (0-byte file).
app_ini_path
Path to the persistent app.ini configuration file.
backups_config_dir
Path to the ue5/ subdirectory under the backup root for UE5 Config .ini backup archives. Auto-creates the directory on first call.
backups_saves_dir
Path to the saves/ directory under the backup root (tar.gz archives). Auto-creates the directory on first call.
cleanup_stale_config
Remove the stale config.ini if it exists. Returns true if removed.
config_base_dir 🔒
Fixed base directory for app.ini and the sentinel file, under the standard platform config location. Separate from backup data so that ~/NotAlterra remains the user’s visible backup data directory.
disclaimer_accepted
Return true if the disclaimer sentinel exists.
ensure_dir
Ensure a directory exists, creating all parents as needed.
exe_dir
Return the directory containing the running executable.
get_backup_root
Return the current backup root, or the default user-profile path.
home_notalterra_dir 🔒
Return ~/NotAlterra as the user’s data directory for save/ue5 backups. Falls back to exe_dir() if home is not available.
load_app_config
Load app.ini from the fixed config directory. Returns default (empty) values if the file does not exist or cannot be read.
reject_disclaimer
Remove the disclaimer sentinel if it exists.
save_app_config
Write the current session paths to app.ini in the fixed config directory.
sentinel_path
Path to the disclaimer sentinel file in the config directory.
set_backup_root
Set a custom backup root directory. Passes ownership.
stale_config_path
Path to the stale config.ini from v0.3.0 and earlier.