I am looking to create an empty file so I can open it for writing using NSFileHandle, is this the correct way or am I missing some better method?
success = [fileManager createFileAtPath:dataFile_OUT contents:nil attributes:nil];
outFile = [NSFileHandle fileHandleForWritingAtPath:dataFile_OUT];
gary
I don’t see anything wrong with what you’ve got… sounds logical if you are planning on writing to the file in a stream.
If the size and availability of your data is such that you don’t need to maintain an open channel to which you can stream data (which I imagine is not your case since you explicitly specified needing to create an empty file), you could eliminate the second line: