Package (macOS)

In the Apple macOS operating system, a package is a file system directory that is normally displayed to the user by the Finder as if it were a single file. [1] Such a directory may be the top-level of a directory tree of objects stored as files, or it may be other archives of files or objects for various purposes, such as installer packages, or backup archives.

package
Uniform Type Identifier (UTI)com.apple.package
UTI conformationpublic.directory
Container fordocuments, bundles

Definition

The package is a common file system abstraction used by Apple operating systems, such as macOS and iOS. It is a directory that may contain a hierarchy of files or objects that represent a preserved, organized state. A package is displayed to users like a single file in the Finder application to avoid being changed by the user. However, the content of packages may be accessed through special keyboard and mouse combination events. For this purpose, the control-click, or right-click, menu displays a directive Show Package Contents.[1]

Some documents may be represented as packages:[2]

  • Rich Text Format documents with images, which carry the .rtfd extension;
  • Dashboard widgets;
  • partially downloaded files in Safari, which carry the .download extension;
  • Final Cut Pro X Camera Archives, which contain multiple QuickTime videos and carry the .fcarch extension;
  • project files in GarageBand, Keynote, Pages, Numbers, iMovie and Xcode;
  • Installer packages.

The Uniform Type Identifier (UTI) for a package is com.apple.package.[3]

Bundles

A package that has a standardized structure for storing executable code and its associated resources, is called a bundle.

gollark: Something like `{"tracks": [{"title": "bee movie full soundtrack", "start": 0, "end": 600000}] }`, while odd-looking, is valid JSON.
gollark: All the parser implementations around should accept that as valid, and you can use a fixed amount of size.
gollark: Okay, very hacky but technically workable: have an XTMF metadata block of a fixed size, and after the actual JSON data, instead of just ending it with a `}`, have enough spaces to fill up the remaining space then a `}`.
gollark: XTMF was not really designed for this use case, so it'll be quite hacky. What you can do is leave a space at the start of the tape of a fixed size, and stick the metadata at the start of that fixed-size region; the main problem is that start/end locations are relative to the end of the metadata, not the start of the tape, so you'll have to recalculate the offsets each time the metadata changes size. Unfortunately, I just realized now that the size of the metadata can be affected by what the offset is.
gollark: The advantage of XTMF is that your tapes would be playable by any compliant program for playback, and your thing would be able to read tapes from another program.

See also

References

  1. "About Bundles". Bundle Programming Guide. Apple, Inc. Retrieved 2011-03-16.
  2. "Document Packages". Bundle Programming Guide. Apple, Inc. Retrieved 2011-03-16.
  3. "System-Declared Uniform Type Identifiers". Uniform Type Identifiers Reference. Apple, Inc. Retrieved 2011-03-16.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.