iOS持续写文件到本地

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS持续写文件到本地相关的知识,希望对你有一定的参考价值。

 

        NSString *tempSavePath = [NSString stringWithFormat:@"%@/Documents",kDocumentPath];

        NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:tempSavePath];

    

//     持续写文件到本地

            [fileHandle seekToEndOfFile];  //将节点跳到文件的末尾

            [fileHandle writeData:data]; //追加写入数据

    

            [fileHandle closeFile];

以上是关于iOS持续写文件到本地的主要内容,如果未能解决你的问题,请参考以下文章