最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Ios中获取文件路径的4种方法
时间:2013-09-07 编辑:简简单单 来源:一聚教程网
代码如下 | 复制代码 |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); #define ABS_FILE_PATH(FILE_NAME) [NSString stringWithFormat:@"%@/Documents/%@", NSHomeDirectory(),FILE_NAME] //获取程序application package目录下的文件路径: stringByAppendingPathComponent:FILE_NAME] NSString* filePath = [[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"fileType (txt...html..)"]; |
相关文章
- java 获取已知文件扩展名的代码 04-21
- 通过拖曳获取文件信息的bat代码分享 03-28
- 三种获取指定文件夹下所有的文件名称方法 01-19
- 四种获取 文件扩展名方法 10-12
- 获取文件的扩展名 06-28
- sora软件价格介绍 02-22