Skip to main content

Module config

Module config 

Source

Structs§

ServerConfig
Server-side configuration, typically stored at /etc/pwr/server.toml or ~/.config/pwr/server.toml.

Functions§

find_config
Search for the server config file in standard locations.
is_path_writable
Check whether the target path (or, if it doesn’t exist yet, its nearest existing ancestor) is writable by the current process.
load_config
Load the server configuration from a specific path.
resolve_config_base
Resolve the appropriate config base directory.
save_config
Save a server configuration to disk, creating parent directories as needed.
system_config_dir
System-wide config directory.
system_data_dir
System-wide data (storage) directory.
user_config_dir
Per-user XDG config directory (~/.config/pwr).
user_data_dir
Per-user XDG data directory (~/.local/share/pwr).
user_runtime_dir
Per-user XDG runtime directory ($XDG_RUNTIME_DIR/pwr, falls back to ~/.cache/pwr).