NSString *tempSavePath = [NSString stringWithFormat:@"%@/Documents",kDocumentPath];
NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:tempSavePath];
// 持续写文件到本地
[fileHandle seekToEndOfFile]; //将节点跳到文件的末尾
[fileHandle writeData:data]; //追加写入数据
[fileHandle closeFile];
时间: 2024-11-08 19:45:24