Even in macOS, resource forks are seldom used anymore.Ĭurrently, macOS supports resource forks on Windows SMB shares by creating a hidden file with the characters "._" added at the beginning of the file name, in the same directory as the data fork file.Įach resource has an OSType identifier (a four byte value) and an ID (a signed 16-bit word), as well as an optional name. However, as forks can make it difficult to exchange files with other operating systems, this feature is not in common use. In the HFS Plus file system, settings can be made to allow other forks in addition to the data and resource forks, to create a "multi-fork" application. Even in a Mac OS system, resource forks cannot be used if the Unix File System has been installed. At present, HFS is supported only by the Macintosh operating system, which means that only machines running Mac OS can use resource forks. Later PowerPC binaries store the executable code in the data fork.Īs resource forks are supported only on the file systems HFS, HFS Plus, and APFS, they cannot be used on operating systems which use other file systems. Classic 68k applications are one example, where even the executable code is contained in resources of type 'CODE'. However, the amount of data stored here is minimal, being just the creation and modification timestamps, the file type and creator codes, fork lengths, and the file name. Being part of the catalogue entry for the file, it is much faster to access this. Note that the Macintosh file systems also have a separate area for metadata distinct from either the data or resource fork. The resource fork is sometimes used to store the metadata of a file, although it can also be used for storing the actual data, as was the case with font files in the classic Mac operating systems. ( Microsoft Windows also has a concept of " resources", but these are completely unrelated to resources in Mac OS.) While access to the data fork works like file access on any other operating system – pick a file, pick a byte offset, read some data – access to the resource fork works more like extracting structured records from a database. The presence of a resource fork makes it easy to store a variety of additional information, such as allowing the system to display the correct icon for a file and open it without the need for a file extension in the file name. The resource fork is implemented in all of the file systems used for system drives on the Macintosh ( MFS, HFS and HFS Plus).
0 Comments
Leave a Reply. |