The information in a file can be used for any of a variety of purposes. Typically a document is a file that a user can create and edit. A document is usually associated with a single application, which the user expects to be able to open by double-clicking the document's icon in the Finder. A file might also contain an application. In that case, the information in the file consists of the executable code of the application itself and any application-specific resources and data.
Applications typically allow the user to create and manipulate documents.
The Macintosh Operating System also uses files for other purposes. For example, the File Manager uses a special file located in a volume to maintain the hierarchical organization of files and folders in that volume. This special file is called the volume's catalog file. Similarly, if virtual memory is in operation, the Operating System stores unused pages of memory in a disk file called the backing-store file. No matter what its function, each file shares certain characteristics with every other file.