iOS 持续往文件写入数据。

持续往文件写入数据,不会覆盖之前写过的。

NSFileHandle * fileHandle = [NSFileHandle fileHandleForWritingAtPath:fileDataPath];

    if(fileHandle == nil)

    {

        return;

    }

    [fileHandle seekToEndOfFile];

    [fileHandle writeData:data];

    [fileHandle closeFile];

猜你喜欢

转载自www.cnblogs.com/sunmair/p/9298268.html