Anonymous user
File input/output: Difference between revisions
Use more relevant example.
(Whitespace, comments) |
(Use more relevant example.) |
||
Line 595:
[[Category:GNU Compiler Collection]]
Read the contents of input.txt and place it in output.txt, creating a file if needed:
NSData *input = [NSData dataWithContentsOfFlie:@"input.txt"];
▲ [info writeToFile:@"/tmp/test.plist" atomically:YES];
Displayed without error checking to make it more clear. In real code you will need to add lot of error checking code, and maybe use dataWithContentsOfFile:error: if you want to get error information on failure.
==[[Perl]]==
|