File input/output: Difference between revisions
Content added Content deleted
m (→{{header|jq}}: any number of JSON entities) |
|||
Line 1,653:
=={{header|Objective-C}}==
For copying files, using <code>NSFileWrapper</code> is preferred:
<lang objc>[[NSFileManager defaultManager] copyItemAtPath:@"input.txt" toPath:@"output.txt" error:NULL];</lang>
If you want to do it manually:
<lang objc>NSData *data = [NSData dataWithContentsOfFile:@"input.txt"];
|