Difference between -fileHandleForWritingAtPath: and fileHandleForUpdatingAtPath:?
-
25-09-2019 - |
Question
For me it sounds like the same thing. Updating a file implies to write to the file. Writing to a file is also an update for me. But I guess there's a subtle difference ;-)
Does anyone know?
Solution
fileHandleForWritingAtPath:
returns an object that responds only to writeData:
.
fileHandleForUpdatingAtPath:
responds to both NSFileHandle read... messages and writeData:
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow