-fileHandleForWritingAtPath: 和 fileHandleForUpdatingAtPath: 之间的区别?

Pro*_*ber 2 iphone nsfilehandle ipad

对我来说,这听起来像是同一件事。更新文件意味着写入文件。写入文件对我来说也是一种更新。但我想有一个微妙的区别;-)

有人知道吗?

Mic*_*hal 5

fileHandleForWritingAtPath:返回一个仅响应 的对象writeData:

fileHandleForUpdatingAtPath:响应 NSFileHandle read... 消息和writeData:.