A file system handles the persistent storage of data files, apps, and the files associated with the operating system itself. Therefore, the file system is one of the fundamental resources used by all processes.
APFS is the default file system in macOS, iOS, watchOS, and tvOS. APFS replaces HFS+ as the default file system for iOS 10.3 and later, and macOS High Sierra and later. macOS additionally supports a variety of other formats, as described in Supported File Systems.
Regardless of the underlying format, all of the disks attached to the deviceâwhether they are physically plugged in or are connected indirectly through the networkâcontribute space to create a single collection of files. Because the number of files can easily be many millions, the file system uses directories to create a hierarchical organization. Although the basic directory structures are similar for iOS and macOS, there are differences in the way each system organizes apps and user data.
Before you begin writing code that interacts with the file system, you should first understand a little about the organization of file system and the rules that apply to your code. Aside from the basic tenet that you cannot write files to directories for which you do not have appropriate security privileges, apps are also expected to be good citizens and put files in appropriate places. Precisely where you put files depends on the platform, but the overarching goal is to make sure that the userâs files remain easily discoverable and that the files your code uses internally are kept out of the userâs way.
About the iOS File System
Apps should be downloaded from a trusted source, such as the vendorâs main site or, even better, the Mac App Store. The Mac App Store resides in /Applications, and each app within it has been vetted by Apple employees and assigned a digital certificate. If the app is caught misbehaving, Apple can pull the plug on the offending app. Note that the Gramblr Instagram app is no longer available but all the apps featured here are excellent alternative to Gramblr. Alternatively, can also install the official Instagram app using an Instagram emulator for Mac although this is far more time consuming and complicated.
The iOS file system is geared toward apps running on their own. To keep the system simple, users of iOS devices do not have direct access to the file system and apps are expected to follow this convention.
iOS Standard Directories: Where Files Reside
For security purposes, an iOS appâs interactions with the file system are limited to the directories inside the appâs sandbox directory. During installation of a new app, the installer creates a number of container directories for the app inside the sandbox directory. Each container directory has a specific role. The bundle container directory holds the appâs bundle, whereas the data container directory holds data for both the app and the user. The data container directory is further divided into a number of subdirectories that the app can use to sort and organize its data. The app may also request access to additional container directoriesâfor example, the iCloud containerâat runtime.
These container directories constitute the appâs primary view of the file system. Figure 1-1 shows a representation of the sandbox directory for an app.
An app is generally prohibited from accessing or creating files outside its container directories. One exception to this rule is when an app uses public system interfaces to access things such as the userâs contacts or music. In those cases, the system frameworks use helper apps to handle any file-related operations needed to read from or modify the appropriate data stores.
Table 1-1 lists some of the more important subdirectories inside the sandbox directory and describes their intended usage. This table also describes any additional access restrictions for each subdirectory and points out whether the directoryâs contents are backed up by iTunes and iCloud.
An iOS app may create additional directories in the
Documents , Library , and tmp directories. You might do this to better organize the files in those locations.
For information about how to get references to the preceding directories from your iOS app, see Locating Items in the Standard Directories. For tips on where to put files, see Where You Should Put Your Appâs Files.
Where You Should Put Your Appâs Files
To prevent the syncing and backup processes on iOS devices from taking a long time, be selective about where you place files. Apps that store large files can slow down the process of backing up to iTunes or iCloud. These apps can also consume a large amount of a user's available storage, which may encourage the user to delete the app or disable backup of that app's data to iCloud. With this in mind, you should store app data according to the following guidelines:
About the macOS File System
The macOS file system is designed for Mac computers, where both users and software have access to the file system. Users access the file system directly through the Finder, which presents a user-oriented view of the file system by hiding or renaming some files and directories. Apps access the file system using the system interfaces, which show the complete file system precisely as it appears on disk.
Domains Determine the Placement of Files
In macOS, the file system is divided into multiple domains, which separate files and resources based on their intended usage. This separation provides simplicity for the user, who only needs to worry about a specific subset of files. Arranging files by domain also lets the system apply blanket access privileges to files in that domain, preventing unauthorized users from changing files intentionally or inadvertently.
Figure 1-2 shows how the local, system, and user domains map to the local file system of a macOS installation. (The network domain is not shown but is similar in many ways to the local domain.) This figure shows the visible directories that the user might see. Depending on the userâs system, other directories may be visible or some of the ones shown here may be hidden.
For information about the contents of the directories in macOS, see macOS Standard Directories: Where Files Reside. For information about the directories that macOS normally hides from the user (and why), see Hidden Files and Directories: Simplifying the User Experience.
Non-essential Mac Apps DownloadmacOS Standard Directories: Where Files Reside
Whether provided by the system or created by your app, every file has its place in macOS. Table 1-2 lists some of the top-level directories in a macOS installation and the types of content that each one contains.
Important: The files in the userâs
Documents and Desktop directories should reflect only the documents that the user created and works with directly. Similarly, the media directories should contain only the userâs media files. Those directories must never be used to store data files that your app creates and manages automatically. If you need a place to store automatically generated files, use the Library directory, which is designated specifically for that purpose. For information on where to put files in the Library directory, see The Library Directory Stores App-Specific Files.
Although the directories in Table 1-2 are the ones seen by macOS users, they are not the only directories present in the file system. macOS hides many directories to prevent users from accessing files that they donât need to.
Sandboxed macOS App File Containers
macOS apps that are sandboxed have all their
Application Support , Cache , temporary directories and other related documents stored within a directory located at a system-defined path that you can obtain by calling the NSHomeDirectory function.
For more information, see App Sandbox Design Guide.
Hidden Files and Directories: Simplifying the User Experience
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:
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.)
Files and Directories Can Have Alternate Names
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:
Display names do not affect the actual name of the file in the file system. Code that accesses a file or directory programmatically must specify the itemâs actual name when opening or manipulating the item using the file system interfaces. The only time your app should ever use display names is when displaying the name of a file or directory to the user. You can get the display name for any file or directory using the
displayNameAtPath: method of NSFileManager .
Important: Your code should not allow users to modify display names directly. When you want the user to specify the name of a file, use a Save panel.
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 Stores App-Specific Files
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:
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 1-3 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. If you want a more complete list of subdirectories, though, see macOS Library Directory Details.
The iCloud File Storage Container
iCloud provides a structured system for storing files for apps that make use of iCloud:
Documents that the user creates and sees in an app's user interfaceâfor example the document browsers in Pages, Numbers, and Keynote should be stored in the
Documents directory. Another example of files that might go in the Documents directory are saved games, again because they are something that an app could potentially provide some sort of method for selecting.
Anything that the app does not want the user to see or modify directly should be placed outside of the
Documents directory. Apps can create any subdirectories inside the container directory, so they can arrange private files as desired.
Apps create files and directories in iCloud container directories in exactly the same way as they create local files and directories. And all the fileâs attributes are saved, if they add extended attributes to a file, those attributes are copied to iCloud and to the user's other devices too.
iCloud containers also allow the storage of key-value pairs that can be easily accessed without having to create a document format.
How the System Identifies the Type of Content in a File
There are two primary techniques for identifying the type of content in a file:
Mac Essentials Guide
A uniform type identifier is a string that uniquely identifies a class of entities considered to have a âtype.â UTIs provide consistent identifiers for data that all apps and services can recognize and rely upon. They are also more flexible than most other techniques because you can use them to represent any type of data, not just files and directories. Examples of UTIs include:
Whenever a UTI-based interface is available for specifying file types, you should prefer that interface over any others. Many macOS interfaces allow you to specify UTIs corresponding to the files or directories you want to work with. For example, in the Open panel, you can use UTIs as file filters and limit the types of files the user selects to ones your app can handle. Several AppKit classes, including
NSDocument , NSPasteboard , and NSImage , support UTIs. In iOS, UTIs are used to specify pasteboard types only.
One way the system determines the UTI for a given file is by looking at its filename extension. A filename extension is a string of characters appended to the end of a file and separated from the main filename with a period. Each unique string of characters identifies a file of a specific type. For example, the
.strings extension identifies a resource file with localizable string data while the .png extension identifies a file with image data in the portable network graphics format.
Note: Because period characters are valid characters in macOS and iOS filenames, only the characters after the last period in a filename are considered part of the filename extension. Everything to the left of the last period is considered part of the filename itself.
If your app defines custom file formats, you should register those formats and any associated filename extensions in your appâs
Info.plist file. The CFBundleDocumentTypes key specifies the file formats that your app recognizes and is able to open. Entries for any custom file formats should include both a filename extension and UTI corresponding to the file contents. The system uses that information to direct files with the appropriate type to your app.
![]()
For more information about UTIs and how you use them, see Uniform Type Identifiers Overview. For more information about the
CFBundleDocumentTypes key, see Information Property List Key Reference.
Security: Protect the Files You Create
Because all user data and system code are stored on disk somewhere, protecting the integrity of files and the file system is an important job. For that reason, there are several ways to secure content and prevent it from being stolen or damaged by other processes.
For general information about secure coding practices when working with files, see Secure Coding Guide.
Sandboxes Limit the Spread of Damage
In iOS and in macOS 10.7 and later, sandboxes prevent apps from writing to parts of the file system that they should not write to. Each sandboxed app receives one or more containers that it can write into. An app cannot write to other appsâ containers or to most directories outside of the sandbox. These restrictions limit the potential damage that can be done in the event that an appâs security is breached.
Developers writing apps for macOS 10.7 and later are encouraged to put their apps in sandboxes to enhance security. Developers of iOS apps do not have to explicitly put their app in a sandbox because the system does it for them automatically at install time.
For more information about sandboxes and the types of restrictions they impose on file system access, see Mac App Programming Guide and App Sandbox Design Guide.
Permissions and Access Control Lists Govern All Access to Files
Access to files and directories is governed by a mixture of access control lists (ACLs) and BSD permissions. Access control lists are a set of fine-grained controls that define exactly what can and cannot be done to a file or directory and by whom. With access control lists, you can grant individual users different levels of access to a given file or directory. By contrast, BSD permissions only allow you to give access to three classes of users: the fileâs owner, a single group of users that you specify, and all users. See Security Overview for more information.
Note: For a file on a network server, do not make any assumptions about the ACLs and BSD permissions associated with the file. Some network file systems provide only a summarized version of this information.
Because iOS apps always run in a sandbox, the system assigns specific ACLs and permissions to files created by each app. However, macOS apps can use Identity Services to manage access control lists for files to which they have access. For information about how to use Identity Services (and the Collaboration framework), see Identity Services Programming Guide.
Files Can Be Encrypted On Disk
Both macOS and iOS provide support for encrypting files on disk:
In iOS, apps that take advantage of disk-based encryption need to be discontinue the use of encrypted files when the user locks the device. Because locking the device destroys the decryption keys, access to encrypted files is limited to when the device is unlocked. If your iOS app can run in the background while the device is locked, it must do so without access to any of its encrypted files. Because encrypted disks in macOS are always accessible while the computer is running, macOS apps do not need to do anything special to handle disk-level encryption.
For more information about working with encrypted files in iOS, see App Programming Guide for iOS.
Synchronization Ensures Robustness in Your File-Related Code
The file system is a resource shared by third-party apps and system apps. Because multiple apps are able to access files and directories at the same time, the potential arises for one app to make changes that render a second appâs view of the file system obsolete. If the second app is not prepared to handle such changes, it could enter an unknown state or even crash. In cases where your app relies on the presence of specific files, you can use synchronization interfaces to be notified of changes to those files.
File system synchronization is primarily an issue in macOS, where the user can manipulate files directly with the Finder or with any number of other apps at the same time. Fortunately, macOS provides the following interfaces to help with synchronization issues:
Files, Concurrency, and Thread Safety
Because file-related operations involve interacting with the hard disk and are therefore slow compared to most other operations, most of the file-related interfaces in iOS and macOS are designed with concurrency in mind. Several technologies incorporate asynchronous operation into their design and most others can execute safely from a dispatch queue or secondary thread. Table 1-4 lists some of the key technologies discussed in this document and whether they are safe to use from specific threads or any thread. For specific information about the capabilities of any interface, see the reference documentation for that interface.
Even if you use an thread-safe interface for manipulating a file, problems can still arise when multiple threads or multiple processes attempt to act on the same file. Although there are safeguards to prevent multiple clients from modifying a file at the same time, those safeguards do not always guarantee exclusive access to the file at all times. (Nor should you attempt to prevent other processes from accessing shared files.) To make sure your code knows about changes made to shared files, use file coordinators to manage access to those files. For more information about file coordinators, see The Role of File Coordinators and Presenters
Copyright © 2018 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2018-04-09
It seems that however powerful your computer is in terms of hardware, itâs never quite quick enough to do what you want. Whether itâs playing the latest games or video editing/authoring/encoding, most users will want to squeeze every last ounce of performance they can out what they have. Of course you could resort to overclocking, but for for some users that just isnât an option.
If youâre in the middle of something which requires all the resources your computer has got, itâs not ideal if Windows decides to look for updates, run a scheduled task, defrag the hard drive or enable the screensaver, or a background program tries to do something that can interrupt what youâre doing. Many tasks on PCâs these days also require you to close all currently running programs, and many software installers ask you to close all other applications to minimize conflicts and to avoid replacing in-use files.
One way to quickly close down unneeded programs and services is to use a tool that can do it automatically for you. Theoretically the less you have running in the background taking up CPU time, memory and using the hard disc, the faster and smoother a game or intensive application will run. Hereâs 7 free tools for you to try.
1. AlacrityPC
AlacrityPC is based on an old boosting tool called FSAutoStart which was made especially to improve Microsoft Flight Simulator performance. Itâs now designed to help you get the most out of your computer when running anything resource intensive by shutting down unnecessary services and processes beforehand. AlacrityPC works with profiles and you can either use one of the defaults or create your own to turn off exactly what processes and services you want. Drag the profile icon to the desktop so you can launch it automatically.
There are some additional optimizations, like memory defragment, shut down the desktop shell, removing the wallpaper and shut down/restart the system when an Autostart program closes. Autostart will launch a program after applying the boost, then revert back after the program closes again. AlacrityPC hasnât been updated since 2008 although it is known to work with Windows 7 and a minor update is on the website but you have to manually copy the files into your Program Files folder. To turn off the update failed message on start, go to Tools -> Options. Requires .NET Framework 2.0 installed in order to run.
Download AlacrityPC
2. JetBoost
If youâre looking for a user friendly booster application that doesnât require much in the way of configuration and you can just click and forget, JetBoost is worth trying. As seen from the screenshot, the interface is clean and simple and for the most basic of usage just click the Boost button.
The default boost method isnât overly aggressive and will simply disable some services, clean the system memory, empty the clipboard, change the power profile to high performance and prevent automatic updates from running. If you want a bit more control by disabling more functions, click the Customize button and you have the option to disable running processes, 3rd party services and the Explorer.exe process. A slightly odd but useful feature is the ability to create a portable version from within the installed application, just click the More icon towards the top right of the window. JetBoost works on Windows 2000 to Windows 8 32-bit and 64-bit.
Download JetBoost
3. ToolWiz Game Boost Free
ToolWiz Game Boost is another tool which aims to be easy to use and operate, not confuse you with loads of options that could potentially cause system problems. Like JetBoost, if you want to use the program without configuring anything, just load it up and click on Enter GameBoost Mode and it will start to close and optimize the system components listed.
In fact, Game Boost doesnât have many options to configure, just 2 sections called Boot Option 1 and Boost Option 2. Option 1 has the only default not enabled option which is you can defrag the files and folder the game is in. Defrag the memory and all the Option 2 settings such as disabling scheduled tasks, windows update, printer support, Aero glass, tablet input and network neighborhood etc are all switched on by default. Game Boost exits while the boosting mode is on and you run it again to turn the boost off. Works on Windows XP to Windows 8.
Download ToolWiz Game Boost
4. Wise Game Booster
Wise may be better known for their disk/registry cleaning and optimizing tools, but Game Booster is another well put together tool that can help to maximize the amount of system resources available for gaming or intensive applications. To quickly optimize the system, simply click on the Optimize All button in the My Games tab. The My Games tab is a shortcut area where you can place your favorite games that youâll run while using the program.
In addition to a number of system services and any unnecessary processes that get disabled when you optimize the system, there are around 20 system tweaks that can be configured such as running Explorer in a separate process, optimizing 5 network settings and boosting several system response speed options and timeouts. Sadly the program doesnât have a simple restore button to set everything back to user defaults and you have to set each section back individually. Works on Windows XP and above, a portable version is available.
Download Wise Game Booster
5. GBoost
When some users look at the interface of this program it will probably remind them of an overclocking utility, but GBoost aims to be quick and easy at disabling unnecessary services and processes to get the last ounce of performance out of their computer. The âPress To Boostâ button will disable the default components and to restore everything back, press the same button again.
The dial around the boost button is a simple measure of how optimized GBoost thinks the system is, the closer to 100, the better. Click the down arrow or Advanced Mode box to get a list of everything that can be disabled. Experienced users might not like the generic names for the disable options such as Gamer Utils, Graphic Artist or Music Players etc, because youâre not 100% sure what itâs disabling. It is easier for the more average user to understand though. A couple of small annoyances are the small ad in the top of the window and the words âProcessesâ and âServicesâ are the wrong way round in the GUI.
Download GBoost
6. SmartClose
SmartClose is a tool that manages to be easier to use than other tools in some parts, yet more complicated in others. The way the program works sounds more like backup software by using before and after Snapshots to disable the processes and services, and then restore them again. A useful feature is the series of setup wizard windows to guide you through the process of creating the snapshot.
During the wizard setup phase you can close all open processes, close (Internet) Explorer windows, disable the screensaver, stop services and whether to create a snapshot file. If you want SmartClose to not kill a certain process, it has to be setup and added as a protected program. The slightly more complicated part is if you want to stop or protect selected services, they have to be configured in the INI text file using Notepad. You can save multiple snapshots for different scenarios and then restore or edit any of them using the wizard. Works on Windows XP, Vista and 7.
Download SmartClose
7. Game Booster
Game Booster from IObit is probably the most thorough and advanced free system boosting tool around if youâre a serious gamer and looking to squeeze every last frame per second out of your system. It works like most other tools by temporarily shutting down background processes, stopping services, cleaning RAM, clearing the clipboard and turning off Windows update. If you want to try and see how it performs without too much configuring, simply click on the big Start Boost button.
You can go and customize the process, service and other general settings yourself via the Configure button and add games to the Game Box which is more of a quick launch and boost window. Game Booster goes even further by being able to check for driver updates, defrag the files for each individual game in the Game Box and apply a few general system tweaks, thereâs also a temperature monitor at the bottom of the window. Some useful extra gamer tools are the options to save a screenshot or even video of your session, and put an FPS counter onto the game screen. Theyâre controlled via configurable hotkeys.
For the latest version of Game Booster, IObit has partnered with the PC peripheral manufacturer Razer and now you have to create an account at Razer to use the program. Many long time users of Game Booster recommend the earlier 3.4 or 3.5 beta version as they donât require registration, are less than half the size but have similar features. If you want, you can download Razer Game Booster and have a look.
Download Game Booster 3.5 Beta | Game Booster 3.4
Note: We did also test another tool called Game Fire. Sadly the program uses the InstallQ setup manager and offered a staggering 7 windows of adware during install. We consider that many unacceptable and canât recommend Game Fire when all the tools above offer no adware and do a similar or better job. Game Fire also calls itself âOpen Sourceâ but you have to buy the pro version to get the source code!!
Editorâs Note: The effectiveness of these tools obviously depends on several factors, and mileage will vary from computer to computer. If your system is well maintained and you keep tight control over what services are enabled and which programs run in your tray etc, then the gains will likely be too minimal to notice. However, if you tend to have several tasks running in the background or your system isnât very powerful, shutting down everything possible could give enough of a boost in performance to make a noticeable difference.
You might also like:Disable Third Party Services and Programs for a Clean Boot in Windows5 Tools to Remove Unnecessary Startup Entries and Boot Faster7 Tools to Detect Non-Windows or Non-Microsoft ServicesRestore Deleted Services and Reset to Default Services Settings6 Ways to Optimize or Reduce Memory Usage for Running Programs
Steve2 years ago
Iâve used EndItAll for years and it works great. Its also pretty compact and simple to use with little confusion.
Reply
See also AlomWare Reset (at alomware.com/reset.htm) which closes all apps and makes your PC feel like itâs been rebooted, without actually doing so.
Reply
Adeel3 years ago
This is what I was looking for Reply
Thanks Barry
Is there any program that can auto kill a process that is using too much RAM? Reply
Like there us a program Iâve been using that for some kind of crash sometimes takes all of my memory, where it usually uses up to 600 mb it ends up using all of it until the PC BSOD. So a program to auto kill a specified program that uses over a specified amount of RAM.
Deputy2765 years ago
GBoost doesnât seem to be working. It starts up and says it has to connect to itâs servers and then shuts down.
Reply
Thanks a ton. Bloating windows, unimaginative customer experience and completely woeful design is what marks windows and growing linux popularity, which has very smooth operations. Microsoft is a lost case if they do not realize to read the hardware specs and configure the QOS accordingly, it needs to get rid of growing updates and automatically close idle services when I configure it for Optimization. Itâs been decades but still the same issues, every few months, we need to back up and restore to factory defaults. absolutely unwanted stuff.
Is not easier for Microsoft to buy one of these and integrate with the OS, if their engineers are absolute dull not see these issues . I may be wrong but this is the issue faced by me for ages. I have to keep writing batch files to clean my stuff or rely on cccleaner or glary tools all the time. . but nothing works except periodic factory defaults or restore backup.
Reply
AstroRanger6 years ago
Are there any apps that do this for Linux? Iâm not against windows but I made the jump to linux after they abandoned xp like a red-headed step-child. Reply
P.S. I am not against red-heads either.
These programs look questionable to me. How do I know itâs not gonna muck up my computer?
Reply
HAL9000 Author7 years ago
If youâre that worried about them doing anything to your computer, you do what any sensible person would do and make a backup of your system or create a Restore point firstâ¦
Reply
thanks raymond
Reply
TheFix12 years ago
Wow, this is a dandy. There are many times where a system completely locks up and you canât figure out what program is causing it. I suppose thatâs where this comes in.
Reply
This is an insane program. How do you find such amazing apps?
Reply
RANGA12 years ago
Excellentâ¦â¦â¦ Thanks a lotâ¦â¦â¦
Reply
thanks ray this is nice especially when you restore your windows and need to put back all the software that you want,
Reply
tartooob12 years ago
Wow nice ~ !
Reply
THANK YOU! just what i was looking for, you freaking rock mate!
Reply
Tarun12 years ago
Thank you very much ray. This is a very good tool. Reply
Good find Leave a ReplyComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |