Mac OS X: Where should I store common application data?

前端 未结 3 1306
一向
一向 2021-02-05 07:50

What\'s the standard path on MacOS X for storing application data that is to be shared by different users? I am not talking about temporary data, but data which is used by one p

3条回答
  •  醉酒成梦
    2021-02-05 08:50

    To get the directory, you can use the function "NSSearchPathForDirectoriesInDomains", with the directory parameter being "NSApplicationSupportDirectory", and the domainMask parameter being "NSLocalDomainMask".

    (NSApplicationSupportDirectory is the "Location of application support files", while NSLocalDomainMask means "Local to the current machine—the place to install items available to everyone on this machine.")

提交回复
热议问题