iOS 获取本机可以存放文件的路径

来源:互联网 发布:mysql数据库设计案例 编辑:程序博客网 时间:2024/04/30 14:58
//获得plist路径-(NSString*)getPlistPath{    //沙盒中的文件路径    NSArray *storeFilePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);    NSString *doucumentsDirectiory = [storeFilePath objectAtIndex:0];    //NSLog(@"---------------%@",storeFilePath);    NSString *plistPath =[doucumentsDirectiory stringByAppendingPathComponent:@"carlist.plist"];       //根据需要更改文件名    return plistPath; //返回公共文档文件夹下 plist文件位置}



NSDocumentDirectory

原创粉丝点击