--- id: os-config_dir name: Os.config_dir category: os kind: namespace-method tokens: Os.config_dir sig: Os.config_dir(app) -> string tip: Per-user config directory for an app. order: 15 ns: Os member: config_dir --- The per-user directory where an application should store configuration, named for the app. | | | | --- | --- | | macOS | ~/Library/Application Support/<app> | | Linux | $XDG_CONFIG_HOME/<app>, or ~/.config/<app> | On macOS this is the same directory as save_dir — the platform keeps config and saves together, and Apple's home for a config file that is not an NSUserDefaults plist is Application Support. On Linux XDG separates the two. An XDG variable that is set but empty falls back to the default, as the spec requires. Parameters: - `app` — the application name (used as the folder name) ```ludic program ConfigDir { entry { let dir = Os.config_dir("MyGame") print(len(dir)) } } ```