Osx file structure
All Rights Reserved. Terms of Use Privacy Policy Updated: Documentation Archive Developer Search. Next Previous. Retired Document Important: This document may not represent best practices for current development. Standard Macintosh file system for older versions of Mac OS. Mac OS Standard file system. Path names vary depending on several factors, including how the network volume was mounted.
When writing code, assume that files on any volume other than the boot volume could be located on a network-based server. This directory contains the system resources required by macOS to run. These resources are provided by Apple and must not be modified. This directory contains one or more user home directories.
The user home directory is where user-related files are stored. Web Sharing must be enabled to display these pages. The preceding directories are for storing user documents and media only. Apps must not write files to the preceding directories unless explicitly directed to do so by the user. The sole exception to this rule is the Library directory, which apps may use to store data files needed to support the current user. Of the subdirectories, only the Public directory is accessible by other users on the system.
Access to the other directories is restricted by default. Although the directories in Table are the ones seen by macOS users, they are not the only directories present in the file system. For more information, see App Sandbox Design Guide. To simplify the experience for users, the Finder, and some specific user-facing interfaces such as the Open and Save panels , hide many files and directories that the user should never have to use.
Many of the hidden items are system- or app-specific resources that users cannot or should not access directly. Among the files and directories that are hidden are the following:.
Dot directories and files. Any file or directory whose name starts with a period. This convention is taken from UNIX, which used it to hide system scripts and other special types of files and directories. Two special directories in this category are the.
UNIX-specific directories. The directories in this category are inherited from traditional UNIX installations. Some of the more important directories that are hidden include:. Typically, you execute these binaries from command-line scripts.
Log files are typically viewed using the Console app. Explicitly hidden files and directories. The Finder may hide specific files or directories that should not be accessed directly by the user. The Finder provides a different user interface for accessing local disks. In macOS Packages and bundles. Packages and bundles are directories that the Finder presents to the user as if they were files. Bundles hide the internal workings of executables such as apps and just present a single entity that can be moved around the file system easily.
Similarly, packages allow apps to implement complex document formats consisting of multiple individual files while still presenting what appears to be a single document to the user. Although the Finder and other system interfaces hide files and directories from the user, Cocoa interfaces such as NSFileManager do not filter out files or directories that are normally invisible to users.
Thus, code that uses these interfaces theoretically has a complete view of the file system and its contents. Of course, a process really has access to only those files and directories for which it has appropriate permissions.
In some situations, the Finder presents users with file or directory names that do not match the actual names as they appear in the file system. These names are known as display names and are used only by the Finder and specific system components such as the Open and Save panels when presenting file and directory information to the user. Display names improve the user experience by presenting the user with content in a more friendly way.
For example, macOS uses display names in the following situations:. Localized names. The system provides localized names for many system directories, such as Applications , Library , Music , Movies.
An app may similarly provide localized names for itself and for any directories it creates. Filename extension hiding. The system hides filename extensions for all files by default. The user may change option, but when filename extension hiding is in effect, the characters after the last period in a filename and the period itself are not displayed.
Display names do not affect the actual name of the file in the file system. The only time your app should ever use display names is when displaying the name of a file or directory to the user. For information on how to localize the directories your app creates, see File System Advanced Programming Topics. For more information about localizing app content, see Internationalization and Localization Guide. The Library directory is where apps and other code modules store their custom data files.
Regardless of whether you are writing code for iOS or macOS, understanding the structure of the Library directory is important. You use this directory to store data files, caches, resources, preferences, and even user data in some specific situations.
There are several Library directories throughout the system but only a few that your code should ever need to access:. Library in the current home directory—This is the version of the directory you use the most because it is the one that contains all user-specific files. In iOS, Library is placed inside the apps data bundle. Sandboxed apps are not permitted to use this directory.
After selecting which version of the Library directory to use, you still need to know where to store your files. The Library directory itself contains several subdirectories that subdivide app-specific content into a few well-known categories. Table lists the most common subdirectories that you might use. Although Library directories in macOS contain many more subdirectories than the ones listed, most are used only by the system.
For example, you might use this directory to store app-created data files, configuration files, templates, or other fixed or modifiable resources that are managed by the app.
A game might use this directory to store new levels purchased by the user and downloaded from a server. Use this directory to write any app-specific support files that your app can re-create easily. Share and collaborate on work with your team in Zapier. Manage multiple teams with advanced administrative controls in Zapier.
You and John from UX worked on it, I think? We are thinking about picking it back up again. For me, requests like this always used to result in a moment of dread followed by a wasted day searching through old files.
That is, until I learned how to avoid all that stress and wasted time. With organized file and folder structures. An Intro to Folder Structures.
What Makes a Good Folder Structure? What Makes a Good File Name? How to Quickly Find Files. Organizing files on your computer is just like organizing anything else. Say you want to organize your clothes. You might sort each type of clothes into separate stacks. Then you might pair the socks or group all the shirts by color. Or, you could throw everything into one drawer and hope you can find the right pair of socks when you need it. And that's how we typically treat our files: we save files randomly to our Desktop and Documents folders, then waste time searching for files every day.
Folder structures can help, just like drawers and dividers can keep your clothes organized. A folder structure is the way folders are organized on your computer. As folders are added over time, you can either keep them at the same level—like Folders 1, 2, and 3 in the chart below—or nest them within each other for a hierarchy—like Subfolders 1B and 1B-1 below. Picture a file cabinet, with three drawers, and several folders in each one—that's how this folder structure would look in real life.
Folders and subfolders like these can keep your files organized in a logical way. If you have 15 subfolders under every folder, though, you might want to reconsider your strategy.
At this point, subfolders stop being helpful and start causing workflow problems. The best folder structure is the one that mimics the way you work. Do you plan important tasks by quarter? A new folder for each quarter's work might be good. Or do you work around projects?
Consider new folders for each project. Browsing through your folders and finding files should be intuitive. For company projects, pick something that works well for everyone in the team, since everyone may not search for a file or folder in the same way you do.
Here are some tips from digital asset management expert Edward Smith :. Create a template: Copy and paste it every time you start a new project or task. Or, even better: save yourself from the hassle of manually re-creating your structure over and over again by setting up a Zap to do it for you.
The first step to building an effective folder structure is figuring out your top-level folder. Do you want to simply make a new folder for every new project? Or perhaps you could organize by time, with folders and subfolders for each year and month? Maybe you work on a couple different types of projects, and could organize based on those types e.
Inside the "advertisements" folder, I have three tasks listed. For each task, I used the folder name to describe the due date mmyy , type of project pay per click or PPC, in this case , and which product the task is focused on.
These folder names act as both keyword tags and add an extra level of organization. If you search by product name or ad type, your folders should pop up easily. Whereas the -a option instructs the command to reveal all files, the -l option specifies that file attributes including permissions, file size and file date be listed, too, within the displayed results.
When working within different directories, and later, when additional Terminal skills are obtained and operators begin performing additional move, copy and even file attribute or permissions changes, it becomes easier to forget in which directory one is currently working. The pwd present working directory command is a quick shortcut command an operator can enter to reveal the current working directory. Erik Eckel owns and operates two technology companies.
As a managing partner with Louisville Geek, he works daily as an IT consultant to assist small businesses in overcoming technology challenges and maximizing IT investments. He is also president o Mac directory structure Many Mac administrators began training as Windows professionals. Using Terminal to access files and folders. Editor's Picks. The best programming languages to learn in
0コメント