I'm reading a book on Objective C, and I was wondering how important the subject Working with files for learning to develop iOS in particular?

On you tube the tutorials are very short, maybe 10 min of video that teaches you how to do stuff with files and URL's. But in the book its a very long chapter with lot's of detail. The basics of working with files and URL's if very clear and simple, so I was wondering when I be really need this and this information become handy, and if I need to dig that deep in this topic right now?

The main question is, if I know the basics, can I move on and come back when I need it? or it's a really crucial to dig in right now?

2 Answers 2


It really depends on your application. I can go years without needing to read from a file, then have a task where I'm doing it all the time.

However, when you do end up needing it, you will probably want to learn it in detail, and not just gloss over parts you think are trivial. There are some subtleties that even trip up veterans sometimes, like the exact sequence of detecting the end of a file from a while loop. But you can safely wait to cross that bridge until you get to it.

  • thanks allot. can you please give me a simple example of an app that needs to use it? or a task where you use it? @Karl Bielefeldt
    – JohnBigs
    Mar 7, 2013 at 23:19
  • @JohnBigs Consider all the things that one would want to do from iStream = [[NSInputStream alloc] initWithFileAtPath:path]; or iStream = [[NSInputStream alloc] inputStreamWithURL:url]; -- Nearly anything you read from somewhere (be it file system or network) looks like a file. Glance at the NSInputSTream Class Refrence and look at the "Related sample Code" section for some ideas of sample apps.
    – user40980
    Mar 8, 2013 at 0:35

Specific to iOS, "working with files" isn't that important for a lot of applications. "Working with streams" however, is. Files are a good introduction to working with streams. So learn to work with files, but pay close attention to the higher-level abstraction of streams.

That said, I learn best when I have a specific project in hand and I'm focused on learning only the thing I need to complete the next step. If that works for you, skip over it for now and circle back when you need it. But like I said in an answer to your other question, where possible read everything you can.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.