This document describes methods and functions for manipulating files and directories (folders).
You should read this document to learn how to:
Represent file paths in Cocoa
Perform basic operations with files and directories
Find standard directories on the system
This document contains the following articles:
“File Management Classes” describes the main classes you use for file-system operations.
“Creating Paths and Locating Directories” explains how to compose paths used in file-system operations.
“File Management” describes how you can perform many generic file-system operations.
“Information about Files and Volumes” describes how you can get and set information about files and volumes.
“Using URLs” describes how to use NSURL
for various file-related operations.
“Working with the Contents of a Directory” describes how to retrieve the contents of a directory using an NSDirectoryEnumerator
object.
“Resolving Aliases” describes how to resolve aliases in a file path.
“File Handle” describes the class that provides a wrapper for accessing open files or communications channels.
“HFS File Types” describes the APIs that allow a Cocoa application to retrieve and create HFS type and creator codes.
To learn how to use file wrappers (and the NSFileWrapper
class), see Application File Management.
Last updated: 2009-07-31