Jump To:
Leopard Reference Library: Cocoa
File management consists of storing persistent information on a physical medium and retrieving that information later. Cocoa provides several programming interfaces for gaining access to stored files, folders, and disc recordings. Developers can also create and display dialogs that solicit choices from users when they are opening and saving files.

Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Resource Type
Sort by
Date
Application File Management (HTML) (PDF)
Explains how Cocoa applications can use, manipulate, and "own" files.
Guides 2006-11-07
AudioBurn (HTML) (DMG) (ZIP)
Demonstrates how to create an object conforming to the DRTrackProduction protocol to create a RedBook audio CD.
Sample Code 2005-03-17
Avoiding the -42 error with DiscRecording (HTML)
QA1292: Explains how to workaround the -42 error when using the DiscRecording API.
Technical Q&As 2004-05-25
ContentBurn (HTML) (DMG) (ZIP)
Creates an audio CD using standard audio files like mp3, aac, aiff, and wav.
Sample Code 2003-10-27
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
Sample Code 2007-06-11
DataBurn (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolder and burn it to disc.
Sample Code 2005-03-17
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
Sample Code 2003-01-14
DeviceListener (HTML) (DMG) (ZIP)
Uses the DiscRecording framework to listen for device plug/unplug events and media insertion events.
Sample Code 2003-07-17
Disc Recording Framework Reference (HTML)
Describes the Objective-C and C API for burning audio and data CDs and DVDs.
Reference 2008-04-08
Disc Recording UI Framework Reference (HTML)
Describes the Objective-C and C API for presenting a user interface when burning audio and data CDs and DVDs.
Reference 2008-04-08
DiscRecording Release Notes (HTML)
Updated for Mac OS X v10.5
Release Notes 2007-10-31
EnhancedAudioBurn (HTML) (DMG) (ZIP)
This Objective-C sample demonstrates how to burn RedBook Audio CDs.
Sample Code 2005-07-06
EnhancedDataBurn (HTML) (DMG) (ZIP)
Objective-C sample which shows how to burn a data disc containing a complete virtual filesystem.
Sample Code 2003-01-14
Eraser (HTML) (DMG) (ZIP)
Uses the DiscRecordingUI framework to present the standard erase, selection and progress dialogs.
Sample Code 2003-01-14
Exclusive File Access in Mac OS X (HTML) (日本語 HTML)
TN2037: Covers exclusive file access In Mac OS X
Technical Notes 2002-05-01
Expanding Tilde-based paths (HTML)
QA1549: Demonstrates how to resolve tilde-based relevant paths.
Technical Q&As 2008-09-08
File Manager Performance and Caching (HTML)
FL16: Discusses traditional Mac OS file system input/output performance issues and the File Manager's volume cache.
Technical Notes 2000-09-01
File System Overview (HTML) (PDF)
Conceptual information and guidelines describing the structure and usage of the Mac OS X file system.
Guides 2008-07-11
File Wrappers with Core Data Documents (HTML) (DMG) (ZIP)
This sample demonstrates how directory file wrappers can be used with NSPersistentDocument.
Sample Code 2009-04-29
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
Sample Code 2005-10-27
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
Sample Code 2006-01-10
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
Sample Code 2004-03-19
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
Sample Code 2008-02-25
FSSetCatalogInfo versus UID and GID (HTML) (日本語 HTML)
QA1251: Describes why FSSetCatalogInfo does not set the UID and GID of the file, and provides a work around.
Technical Q&As 2003-03-26
HFS Plus Volume Format (HTML) (日本語 HTML)
TN1150: Describes the physical layout of an HFS Plus volume.
Technical Notes 2004-03-05
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
Sample Code 2003-01-14
Low-Level File Management Programming Topics (HTML) (PDF)
Explains the low-level ways Cocoa applications can interact with files.
Guides 2009-03-05
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
Sample Code 2003-01-14
MoreFilesX (HTML) (DMG) (ZIP)
Deprecated - Shows various File Manager operations through a collection of high-level routines using HFS Plus APIs.
Sample Code 2005-05-13
NSDirectoryEnumerator Class Reference (HTML) (PDF)
Describes the facility for enumerating the contents of a directory.
Reference 2008-10-15
NSFileHandle Class Reference (HTML) (PDF)
Describes an object for accessing files or communication channels.
Reference 2008-10-15
NSFileManager Class Reference (HTML) (PDF)
Describes an object that performs file-system operations.
Reference 2008-10-15
NSFileWrapper Class Reference (HTML) (PDF)
Describes a representation of a file-system node.
Reference 2008-10-15
NSInputStream Class Reference (HTML) (PDF)
Describes a read-only data stream.
Reference 2007-04-05
NSMetadataItem Class Reference (HTML) (PDF)
Describes the metadata of a file.
Reference 2006-05-23
NSMetadataQuery Class Reference (HTML) (PDF)
Describes a Spotlight query for file metadata.
Reference 2007-04-02
NSMetadataQueryAttributeValueTuple Class Reference (HTML) (PDF)
Describes metadata query results.
Reference 2007-04-02
NSMetadataQueryResultGroup Class Reference (HTML) (PDF)
Describes a group of metadata query result objects.
Reference 2007-04-02
NSOpenPanel - Choosing any file and ignoring packages (HTML)
QA1468: Explains how to configure NSOpenPanel to filter only files and ignoring packages.
Technical Q&As 2007-01-25
NSOpenPanel Class Reference (HTML) (PDF)
Describes the panel that a user employs to locate and open a file.
Reference 2009-02-04
NSOutputStream Class Reference (HTML) (PDF)
Describes a write-only data stream.
Reference 2009-01-06
NSSavePanel Class Reference (HTML) (PDF)
Describes the panel that a user employs to set a file-system location and save a file.
Reference 2009-02-04
NSStream Class Reference (HTML) (PDF)
Describes an interface for reading and writing data.
Reference 2008-10-15
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
Sample Code 2007-05-22
Querying Metadata With Spotlight (HTML)
TN2192: Describes how a Cocoa application can search Spotlight metadata.
Technical Notes 2007-06-04
Resolving Alias Files Quietly (HTML)
FL30: Describes how to resolve alias files on remote volumes without user interaction.
Technical Notes 1999-11-01
Simplifying Data Handling with Uniform Type Identifiers (HTML)
Learn to use UTIs to take advantage of key Mac OS X technologies in your application.
Articles 2005-07-12
Sorting Like the Finder (HTML)
QA1159: Shows how to sort strings like the Finder's list view.
Technical Q&As 2004-10-27
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
Sample Code 2007-11-15
Spotlight Importer Programming Guide (HTML) (PDF)
Describes the role of metadata importers and how to write them.
Guides 2007-05-27
Spotlight Metadata Attributes Reference (HTML) (PDF)
Describes metadata attributes used with Spotlight.
Reference 2007-05-22
Spotlight Query Programming Guide (HTML) (PDF)
Describes how to add Spotlight searching to your applications.
Guides 2006-03-08
SpotlightFortunes (HTML) (DMG) (ZIP)
Demonstrates how to provision a Spotlight importer plug-in for a custom UTI, and how to use a NSMetadataQuery with bindings to display live query results in a table view.
Sample Code 2008-06-06
Third party VFS can't unmount on Mac OS X 10.3 (HTML)
QA1308: Describes changes in unmounting behavior for VFS plug-ins under Mac OS X 10.3 "Panther."
Technical Q&As 2003-10-23
Tiger Develop Overview Series: Working with Spotlight (HTML)
Learn to make the most of Spotlight's powerful search technologies within your own applications.
Articles 2004-10-07
Uniform Type Identifiers Overview (HTML) (PDF)
Describes uniform type identifiers and how to use them.
Guides 2008-04-08
Using UTIs to Identify Image Files (HTML)
QA1518: Explains how to use Uniform Type Identifiers to identify what files can be opened at images.
Technical Q&As 2007-05-11
Verification (HTML) (DMG) (ZIP)
Objective-C example which demonstrates how to provide custom data verification for data written to disc.
Sample Code 2004-01-23
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
Sample Code 2006-08-04
Weak Linking To Spotlight (HTML)
QA1422: Describes a problem with weak linking to Spotlight (the Metadata framework), and its solution.
Technical Q&As 2005-06-03