The Library
directory is a special directory used to store application-specific and system-specific resources. Each file-system domain has its own copy of the Library
directory, with access levels to match the domain type. (See “File-System Domains” for a discussion of domains.) Although an application can use this directory to store internal data or temporary files, it is not intended for storage of the application bundle itself or for user data files. Application bundles belong in an appropriate /Applications
directory, while user data belongs in the user’s home directory.
Important: You should not store user data files in the Library
directory or any of its subdirectories. If your application stores the user’s data automatically—that is, without prompting the user for a location—you should choose a more appropriate location (usually the Documents
directory) inside the user’s home directory. For the list of user directories, see “The User Domain.”
The Library
directory contains many standard subdirectories. System routines expect many of the standard subdirectories to exist, so it is never a good idea to delete subdirectories of Library
. However, applications can create new subdirectories as needed to store application-specific data.
Table 1 lists some of the directories that can appear in a Library
directory. You should use this table to determine where to put files needed to support your software. This list is not complete, but it lists some of the most relevant directories for developers. Directories that do not appear in all domains are noted appropriately.
Subdirectory |
Directory contents |
---|---|
|
Contains application-specific data and support files such as third-party plug-ins, helper applications, templates, and extra resources that are used by the application but not required for it to operate. This directory should never contain any kind of user data. By convention, all of these items should be put in a subdirectory named after the application. For example, third-party resources for the application MyApp would go in |
|
Contains programs that assist users in configuration or other tasks. |
|
Contains audio plug-ins and device drivers. |
|
Contains cached data that can be regenerated as needed. Applications should never rely on the existence of cache files. Cache files should be placed in a directory whose name matches the bundle identifier of the application. Cache data should further be subdivided into user or session-specific subdirectories as needed. (See Multiple User Environments in Mac OS X Documentation for user-specific guidelines.) |
|
Contains resources for picking colors according to a certain model, such as the HLS (Hue Angle, Saturation, Lightness) picker or RGB picker. |
|
Contains ColorSync profiles and scripts. |
|
Contains system bundles and extensions. |
|
Contains plug-ins for extending system-level contextual menus. |
|
Contains documentation files and Apple Help packages intended for the users and administrators of the computer. (Apple Help packages are located in the |
|
Contains device drivers and other kernel extensions. (Available in the system domain only.) |
|
Contains aliases to frequently accessed folders, files, or websites. (Available in the user domain only.) |
|
Contains font files for both display and printing. |
|
Contains frameworks and shared libraries. The |
|
Contains plug-ins, libraries, and filters for web-browser content. |
|
Contains keyboard definitions. |
|
Contains log files for the console and specific system services. Users can also view these logs using the Console application. |
|
Contains the user’s mailboxes. (Available in the user domain only.) |
|
Contains plug-ins for the System Preferences application. Developers should install their custom preference panes in the local domain. |
|
Contains the user preferences. See Runtime Configuration Guidelines for information about user preferences. |
|
In the system and local domains, this directory contains print drivers, PPD plug-ins, and libraries needed to configure printers. In the user domain, this directory contains the user’s available printer configurations. |
|
Contains QuickTime components and extensions. |
|
Contains screen saver definitions. See Screen Saver Framework Reference for a description of the interfaces used to create screen saver plug-ins. |
|
Contains scripts and scripting resources that extend the capabilities of AppleScript. |
|
Contains system alert sounds. |
|
Contains system and third-party scripts and programs to be run at boot time. (See System Startup Programming Topics for more information about starting up processes at boot time.) |
|
Contains web server content. This directory contains the CGI scripts and webpages to be served. (Available in the local domain only.) |
© 2003, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-07-11)