Equivalents of XDG_CONFIG_HOME and XDG_DATA_HOME on Mac OS X?

前端 未结 3 1021
花落未央
花落未央 2021-01-30 22:46

I am planning to develop a cross-platform script. On Linux and other operating systems, it will store configuration in XDG_CONFIG_HOME and data files (specifically,

3条回答
  •  借酒劲吻你
    2021-01-30 23:24

    I would use ~/Library/Application Support/script_name/. The subdirectories inside Application Support are used conventionally by various apps, including Apple's own softwares. But it's not enforced by the OS and not tied to apps inside /Applications. So you're perfectly free to create your own directory in it.

    For the directory structure of OS X in general, see this Apple document.

提交回复
热议问题