Skip to Content
Cocoa® Programming for Mac OS® X For Dummies®
book

Cocoa® Programming for Mac OS® X For Dummies®

by Erick Tejkowski
February 2009
Beginner content levelBeginner
408 pages
7h 53m
English
For Dummies
Content preview from Cocoa® Programming for Mac OS® X For Dummies®

Chapter 13. Managing Your Files

In This Chapter

  • Using file paths in Cocoa

  • Opening files

  • Finding out about files

  • Displaying a Files icon in your interface

  • Copying, moving, creating, and deleting files and folders

  • Creating a folder

Almost every device that Apple ships sports some kind of storage device. Whether it's the hard drive in your old iPod, a SuperDrive in your desktop Macintosh, or a flash drive in your MacBook Air, all storage devices share one common trait — they store data. To facilitate this storage, the Mac OS X operating system uses a hierarchical system of files.

Cocoa has a large array of functions that you can use to make your file manipulation tasks easier. With only a few lines of code, it's a cinch to open, copy, move, and delete any file or folder on your hard drive, assuming that you have adequate privileges for the file or folder. This chapter shows you how.

About Files and Folders in Mac OS X

Mac OS X has several types of files. You are undoubtedly familiar with the most basic file type — a document. You use document files every time you save work in your favorite word processor. When you want to view the document, you simply reopen it with your word processor.

Documents aren't the only type of file on your Mac, however. Another important file type is the application. You're probably also very familiar with this file type because you use applications to surf the Web, send e-mail, draw pictures, or program with Xcode. In fact, the whole point of Cocoa programming is to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Aaron Hillegass, Adam Preble, Nate Chandler
Learning Cocoa with Objective-C, 2nd Edition

Learning Cocoa with Objective-C, 2nd Edition

Apple Computer Inc, James Duncan Davidson
Learning Cocoa with Objective-C, 4th Edition

Learning Cocoa with Objective-C, 4th Edition

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

Publisher Resources

ISBN: 9780470432891Purchase book