iOS获取沙盒目录+URLForDirectory:inDomain:appropriateForURL:create:error: NSFileManager
2014-01-18 22:32
1166 查看
参考:
1. http://stackoverflow.com/questions/13983091/nsfilemanager-urlsfordirectory-or-urlfordirectory
2. http://blog.csdn.net/enuola/article/details/8076221
目的:
其实参考里已经介绍了获取沙盒路径方法,但是我很想知道的是用NSUserDomainMask时,使用不同NSSearchPathDirectory 我的iOS返回是什么?
Environment: Mount Lion ,Xcode 4.5.3 , cocos2d-iphone V2.0
那么NSSearchPathDomainMask不是NSUserDomainMask时能使用urlForDirectoryxxx方法吗??iOS下有啥不同??
1. http://stackoverflow.com/questions/13983091/nsfilemanager-urlsfordirectory-or-urlfordirectory
2. http://blog.csdn.net/enuola/article/details/8076221
目的:
其实参考里已经介绍了获取沙盒路径方法,但是我很想知道的是用NSUserDomainMask时,使用不同NSSearchPathDirectory 我的iOS返回是什么?
Environment: Mount Lion ,Xcode 4.5.3 , cocos2d-iphone V2.0
NSSearchPathDirectory值 | 实际ios返回值 |
---|---|
NSApplicationDirectory = 1 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Applications |
NSDemoApplicationDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Applications/Demos |
NSDeveloperApplicationDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Developer/Applications |
NSAdminApplicationDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Applications/Utilities |
NSLibraryDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/ |
NSDeveloperDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Developer |
NSUserDirectory | nil |
NSDocumentationDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/Documentation |
NSDocumentDirectory | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Documents/ |
NSCoreServiceDirectory | nil |
NSAutosavedInformationDirectory = 11 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/Autosave%20Information |
NSDesktopDirectory = 12 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Desktop |
NSCachesDirectory = 13 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/Caches/ |
NSApplicationSupportDirectory = 14 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/Application%20Support |
NSDownloadsDirectory = 15 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Downloads |
NSInputMethodsDirectory = 16 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/Input%20Methods |
NSMoviesDirectory = 17 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Movies |
NSMusicDirectory = 18 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Music |
NSPicturesDirectory = 19 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Pictures |
NSPrinterDescriptionDirectory = 20 | nil |
NSSharedPublicDirectory = 21 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Public |
NSPreferencePanesDirectory = 22 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/PreferencePanes |
NSItemReplacementDirectory = 99 | nil |
NSAllApplicationsDirectory = 100 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Applications |
NSAllLibrariesDirectory = 101 | file://localhost/Users/hemarcus/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/00F96338-26D1-491D-8BA7-E97663752A1F/Library/ |
NSSearchPathDomainMask | URLForSearch=NSLibraryDirectory | URLForSearch=NSApplicationDirectory | URLForSearch=NSDemoApplicationDirectory |
---|---|---|---|
NSLocalDomainMask = 2 | file://localhost/Library/ | file://localhost/Applications/ | file://localhost/Applications/Demos |
NSNetworkDomainMask = 4 | file://localhost/Network/Library | file://localhost/Network/Applications | file://localhost/Network/Applications/Demos |
NSSystemDomainMask = 8 | file://localhost/System/Library/ | file://localhost/Applications/ | file://localhost/Applications/Demos |
NSAllDomainsMask = 0x0ffff | 同NSUserDomainMake返回值 | 同NSUserDomainMake返回值 | 同NSUserDomainMake返回值 |
相关文章推荐
- Objective-C创建目录接口createDirectoryAtPath:withIntermediateDirectories:attributes:error:中参数attributes的设置
- Objective-C创建目录接口createDirectoryAtPath:withIntermediateDirectories:attributes:error:中参数attributes的设置
- iOS沙盒(sandBox)机制(一)之获取沙盒路径及目录说明
- ios-day12-01(ios开发中的数据存储的常用方式有哪些、应用沙盒目录结构、应用沙盒目录路径的常见获取方式)
- IOS创建目录接口createDirectoryAtPath:withIntermediateDirectories:中参数attributes的设置
- iOS 应用沙盒目录的常见获取方式
- iOS开发-canOpenURL: failed for URL: "mqq://" - error: "This app is not allowed to query for scheme mqq
- [iOS]canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- iOS 获取沙盒目录
- Objective-C创建目录接口createDirectoryAtPath:withIntermediateDirectories:attributes:error:中参数attributes的设置
- IOS常用获取沙盒路径,URL方法
- 关于iOS沙盒的目录结构和获取
- Ios9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- iOS 沙盒目录结构和文件操作(NSFileManager)(二)
- iOS获取沙盒目录
- iOS 9 failed for URL: "XXX://@" - error: "This app is not allowed to query for scheme XXX" iOS 从APP里
- Ios9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- IOS沙盒(SandBox)机制以及沙盒目录路径的获取
- IOS获取各个文件目录路径的方法以及相关沙盒机制理解
- IOS中获取各种文件的目录路径的方法,清除沙盒缓存时,如何显示设备的总容量和可用容量