Mac OS X system-system file structure (2)

Source: Internet
Author: User
Tags install mac os x

Library directory

Library is a special directory used to store specific applications and specific system resources. Each file system domain has copies of its own library directories.
Different access levels are available to match different domain types. Although an application can use this directory to store internal data or temporary files, the application's bundle itself or user data files are stored in
In the library directory, tokens are obtained. The application bundle should be placed in a/applications directory, and the user data should be placed in the user's home directory.

Library contains many standard subdirectories. System routines require that many standard subdirectories exist. Therefore, it is never a good idea to delete a library subdirectory. However, when you need to store specific application data, the application can create a new subdirectory.

Application Support
Third-party plug-ins, help programs, templates, and other resources for specific applications. As required, these items should be placed in subdirectories named by the application. For example, the third-party resources of the application MyApp will be placed in the Application
Support/MyApp. Note that a resource created by an application developer should be placed in its own application package. For more information, see the application package section.

Assistants
Programs that help you complete configurations and other tasks.

Audio
Sound plug-ins and device drivers.

Colorpickers
A resource that obtains colors based on a certain mode, such as HLS (hue angle, saturation, lightness) or RGB
Color Filter.

ColorSync
ColorSync description and script

Components
Plug-ins and extensions in the system.

Document. tion
Document files and Apple
(In the subdirectory help), users and administrators on the computer can use them. In this region, this directory contains the help package (including the developer documentation) installed by Apple ).

Extensions
Device drivers and other internal extensions (system domains only ).

Favorites
Frequently accessed folders, files, or web site substitutes (only for user domains ).

Fonts
The font file used to display and print.

Frameworks
Framework and shared library.

Internet
Plug-ins, libraries, and filters for the Internet.

Keyboards
Keyboard definition.

Mail
Contains the user's mailbox (only for the user domain ).

Preferences
For user presets, see "user configuration" in the "System presets" chapter.

Printers
The print driver (provided by the vendor) and the PPD plug-in.

QuickTime
Quick time plug-ins and extensions.

Scripting Additions
Expanded the script and script resources of the applescript function.

Sherlock plug-ins
Extended the plug-in of the Sherlock function.

Sounds
System warning.

Startupitems
For more information about the systems and third-party scripts and programs that run at startup, see "start a project" in the "boot and login" chapter.

Web Server
The content of the Web server. This directory contains the CGI script and the standby web page.

----------------------
Developer directory
Used to develop Mac OS
X software is an optional software installation package. When you install the development tool, the installer places all software components in the startup volume (/Mac
OS X) in the developer directory.

Applications
Users Manage and create software projects (Project builder), and create user interfaces (interfaces)
Builder) and the application that executes the debugging program.

Document. tion
Developer documentation

Examples
Project instances (carbon, Java, and so on) of the classification organization ).

Headers
Special header files, such as simple legacy carbon header files.

Java
The files required for Java bridging in the cocoa application environment.

Makefiles
Used to create and change makefile (. Make file) and jamfile (. Jam file) required by the project ).

Palettes
The interface builder palette provided by Apple.

Pbbundles
The load bundle used by project builder.

Projectbuilder extras
Project builder templates and plug-ins.

Projecttypes
Definition of the project type used by project Builder

Tools
Command Line development tools, including those for creating and generating HFS resource branches.

Project
Builder defines a set of makefile variables, which should be used when your project is specified in the file system domain. You should use these variables instead of hard encoding the directory path, because these locations may be changed.

----------------------
Classic environment directory

The classic environment contains several directories that support classic applications. The directory in these classic environments is a Mac OS
9. Mac OS x needs to install a Mac OS for the classic environment
9.1 (or an updated version ). If a system is installed with a version earlier than Mac OS 9, you must install an updated version to support Mac OS
X.
One system may have multiple Mac OS
Version 9 is installed on different partitions. In this case, the system preset classic settings panel allows you to select one of the Mac OS for the classic environment.
Version 9. When you start classic for the first time, the system attaches some necessary files to the selected Mac OS.
9 volumes in the system folder. You can also use the classic settings panel in the system to start or stop the classic running environment at any time. You can also use
Disk) "system preset to change the boot disk from Mac OS x to Direct start to Mac OS 9.
When you install Mac OS on a volume
9.1 (or an updated version), the installer creates several directories to store system files. Table 9-6 lists the directories created by the installer and their descriptions. If you have installed a Mac
For OS x and Mac OS 9.1 (or updated) versions, the installation program for Mac OS 9 may not create all these directories.

Applications (Mac OS 9)
Contains Mac OS 9 (Classic) applications and utilities.

Document.
Contains information about a specific application. This directory can only be used by classic applications. Mac OS
X applications store preset and other application files in the appropriate/library directory. Users should store their documents in their own home directory.

System Folder
System files that contain the classic environment.
When you install Mac OS x on a system with Mac OS 9 installed, the installer executes some additional tasks to support the classic environment. Mac in particular
The OS x installer creates a proxy for the Mac OS 9 Desktop Folder and places it on the desktop of the administrator who can run the installer. This avatar is included in the Mac
Before OS x is installed, links to any files on the Mac OS 9 desktop.
Localized directory name
If your application package is installed with any directories supported by users, you can not only provide localized names for the application, but also provide localized names for these directories. Localize your specific applications
Name recording is unnecessary and may not always be valid. If you want to localize the directories supported by your application, you should only perform local operations for those directories whose names are pre-known to your application.
. We do not recommend that you localize the "user-specific" directory name.

To localize the directory name, you must add the. localized extension to the directory name and set it to hidden by default. Create a subdirectory named. localized in your directory. Here
In the subdirectories, the idea creates a strings file for each localized version supported by the idea. The strings file contains a single entry to the localized version of the directory name. For example
English, Japanese and
The German localized Release Notes directory will contain the following structure

Release Notes. localized/



. Localized/


En. Strings


De. Strings


Ja. Strings

In each strings file, you need to convert the non-localized directory name into the localized directory name. For example, to convert the directory name "release"
Notes becomes a localized directory name. Each strings file must contain entries similar to the following.

"Release Notes" = "localized name"

Note: Many system-defined directories do not contain the. localized extension in their names. Because these directories already exist before the localized file system name is introduced. For these known directories, Mac
OS X searches for an empty file named. localized in the directory. If this file exists, Mac OS X displays the local directory name text.

----------------------
Differences between HFS + and UFS
There are many important differences between two major Mac OS X file systems: HFS + and UFS. In many cases, these differences are different from those in Mac OS
Programs Developed on X are associated. The following list summarizes the main differences between the two file systems (some statements apply to both HFS and HFS + ):
Case sensitivity: UFS is case sensitive, while HFS + is case insensitive, but it can be case sensitive.
Multi-branch: HFS + supports multiple branches (and additional metadata), while UFS only supports a single branch (carbon does not support multiple branch systems "such: ufs is like a multi-branch structure ).

Path separator: HFS + uses a colon as the path separator, while UFS uses a forward slash. The system can convert between these separators.
Modification date: HFS + supports file creation and modification date records, which will be saved as file metadata; while UFS only supports file modification date records, file creation date record is not supported.
If you use a command to copy a file, this command will process the modification date, but will not process the creation date. When it creates a new file for a copy, this command will reset its modification date. Because
This may cause the creation date of a file to be later than the modification date.

Sparse file and zero fill: UFS supports sparse files (sparse files). It is a file system that stores file data and does not store unused space allocated to files. HFS + does not support sparse files. In fact, you can use "zero" to fill the file with all unused bytes until the end of the file.

For a lightweight reference to a file system project, see the "Avatar and symbolic connection" section.
In addition, Apis associated with each file system sometimes have different features. For example, a BSD
(Or from BSD) an API program can delete an opened file. On the other hand, a carbon program can only delete one closed file.

----------------------
Substitutes and symbolic connections
Substitutes and symbolic links are lightweight references to folders and directories. Dual and Mac OS standard format (HfS) and Mac OS
Extended formats (HFS +) are associated, and symbolic connections are a feature of the UFS file system. Both the Avatar and symbolic connections allow multiple references to folders and directories without creating multiple copies for these projects. Mac
Before OS X 10.2, when a referenced file or folder is moved or changed, the connection between the Avatar and the symbol is very different in terms of processing method.
Originally, the Avatar first uses the unique identifier of the folder and directory to locate them, and then uses their path. If you move a file on the same volume, any avatar pointing to that file will still point to the original location. If you delete an object and replace it with a file of the same name, the Avatar can still work because they can locate the object using a path. From Mac
From OS X 10.2, the Avatar reversed the search order, using the path first and then using the file ID.
Because both the Avatar and symbolic connections use a file system path to determine the file location, they provide similar basic work methods. If you replace a file with the same name, move the old file to a new bit.
And the symlink points to the new file. However, if you move a file instead of replacing it, the symbolic connection will interrupt the file, but the replacement will not.

In HFs
And HFS + file systems, each file and directory will have a unique fixed identity. The replacement stores the unique identifier and path information of the file or directory. If you cannot find it through the path information in the replacement
The replacement attempts to use its unique identifier to locate the file. If a file is found, the proxy updates its internal records with the new path information. Similarly, if the path is correct and the unique identifier is incorrect, the replacement will also
Use the unique identifier of the new file to update its internal records.

Nowadays, finder and other system applications use a replacement by first finding the path. However, by using alias
When the proxy manager method is used to handle the proxy, it will still use the method of searching based on the unique identifier of the file.
If your application supports Mac OS x 10.2 and earlier Mac OS X
When you modify a file, you must comply with certain rules. First, you can modify an existing file when you need to edit it. Second, if you need to replace a file with a new version
Fsexchangeobjects to replace the old file with the new one. Nsdocument. Update document files in a similar way. Therefore, substitutes are valid at any time.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.