NSString *homePath = NSHomeDirectory();
NSLog(@"%@",homePath);
//应用程序主资源包的路径,应用程序中的资源,在应用程序第一次执行中,会自己主动复制到应用程序的主资源包中
NSString *appPath = [[NSBundle mainBundle]bundlePath];
NSLog(@"%@",appPath);
//读取家文件夹中Documents文件夹
NSString *docuPath = [homePath stringByAppendingString:@"/Documents"];
NSLog(@"%@",docuPath);
//获取temp文件夹
NSString *tmp = NSTemporaryDirectory();
NSLog(@"%@",tmp);
//获取主资源包资源数据(图片资源在黄色文件夹中的获取方法)
NSString *picPath = [[NSBundle mainBundle]pathForResource:@"17_1" ofType:@"jpg"];
NSString *picPath2 = [[NSBundle mainBundle]pathForResource:@"17_2" ofType:@"jpg" inDirectory:@"images"];
NSString *picPath3 = [[NSBundle mainBundle]pathForResource:@"/images/17_2.jpg" ofType:nil inDirectory:nil];