As Objective-C is superset of C, I guess I can use fopen/fread/fwrite/fprint...
just like I do with C.
Does that mean that Objective-C doesn't have its unique file processing function?
As Objective-C is superset of C, I guess I can use fopen/fread/fwrite/fprint...
just like I do with C.
Does that mean that Objective-C doesn't have its unique file processing function?
Objective-C doesn't have file handling, nor does C. However, the C Standard Library does. And if you want to use Objective-C, you can use the C Standard Library.
Objective-C is mostly used with Foundation, so
-[NSData writeToURL:atomically:]
and-[NSString writeToURL:atomically:encoding:error:]
can be used if you link to the Foundation framework.For reading files the methods are
-[NSData initWithContentsOfURL:options:error:]
and-[NSString initWithContentsOfURL:encoding:error:]
.