简体   繁体   中英

Accessing user scripts directory in Mac OS X Lion

I want my app to be able to execute some user scripts which can be installed in the app-specific user scripts directory (like ~/Library/Application Scripts/appbundleidentifier ), but [[NSFileManager defaultManager] URLForDirectory:NSApplicationScriptsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:&error] only works in Mountain Lion as NSApplicationScriptsDirectory was introduced with Mountain Lion. How can I find this directory under Mac OS X Lion? The app is sandboxed, so hardcoding the path is not an option.

我相信,该功能在10.7中不存在,因此该文件夹不存在,因此您无法“查找”它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM