获取沙盒文件夹路径
来源:互联网 发布:软件开发平台 编辑:程序博客网 时间:2024/06/11 12:58
有两种获取沙盒路径的方法:
//第一种方法//(1)获取主目录NSString *homePath = NSHomeDirectory();//(2)拼接路径NSString *documentsPath = [homePath stringByAppendingPathComponent:@"Documents"];NSLog(@"Documents路径:%@\n",documentsPath);//第二种方法 NSArray *documentArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *documentsPath = [documentArray objectAtIndex:0];NSLog(@"Documents路径:%@\n",documentsPath); NSArray *libraryArray = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);NSString *libraryPath = [libraryArray objectAtIndex:0];NSLog(@"Library路径:%@\n",libraryPath);NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];NSLog(@"Library下的Caches路径:%@\n",cachesPath);NSString *tmpPath = NSTemporaryDirectory();NSLog(@"tmp路径:%@\n",tmpPath);
0 0
- 获取沙盒文件夹路径
- IOS获取沙盒里面文件夹路径
- iOS创建、删除文件夹、获取沙盒路径
- 获取系统文件夹路径
- 获取文件夹路径
- 获取特殊文件夹路径
- 获取文件夹路径 MFC
- 获取文件夹路径
- VC++ 获取文件夹路径
- 获取文件夹路径
- FolderBrowserDialog获取文件夹路径
- WPF 获取文件夹路径
- Android文件夹路径获取
- Android获取文件夹路径
- 浏览文件夹路径--获取路径
- 获取某文件沙盒路径 删除对应文件 获取文件夹总大小
- VC获取指定文件夹路径
- 获取一个文件夹的路径
- cmake使用
- 静态内部类
- 从paxos到zookeeper读书笔记
- css强制换行
- Android逐帧动画基础
- 获取沙盒文件夹路径
- 第一章 JavaScript基础
- Bulkload Hive表到HBase
- linux系统中内存爆满之后会如何?
- 二叉树的构造(一)
- 1381: Munching(BFS)
- bsoj: 2857 -- 【2011福建】TT的身体
- 简单的NFA转DFA的代码实现
- MyBatis主配置文件SqlMapConfig.xml