OpenWindows User's Guide

Identify Choice Item

TheIdentify choice item determines how the current class of files (the selected File Type entry) is recognized by DeskSet applications, such as the File Manager. A class of files is recognized either by Name or by Content, as defined in the following sections:

Identify By Name

If the Identify choice is by Name, files are recognized by the pattern in the Pattern text field. In this case, the Pattern is often the name of an application. For example, Figure 16-9 shows the clock File Type entry that is bound to the clock-prog Binder entry. Any file called clock will be displayed by the File Manager with the clock icon and colors displayed in the base window scrolling list. (The icon and colors are defined by the clock-prog Icon properties.)

Figure 16-9 Clock File Type Entry

When the Identify choice is "by Name" and the Pattern text field contains an asterisk (*), the asterisk in the Pattern means "match any file name here." For example, the File Type Entry *.ps, shown in Figure 16-10, matches all files that end with.ps. These files are PostScript files, and are displayed in the DeskSet with the postscript-file icon displayed in the Binder base window scrolling list.

Figure 16-10 The *.ps File Type Entry

Graphic

An exception to the rule about matching the pattern with the file name occurs with the Binder entries default-app, default-dir, and default-doc. The File Manager application uses these entries to determine the bindings for its default application files, directories (folders), and documents. The File Type patterns for these bindings are default|app, default|dir, and default|doc. You will never, however, actually find a file called default|app, default|dir, or default|doc. See "Changing a Binding" for information about how to change these default File Manager bindings.

Identify by Content

If the Identify choice is by Content, files are recognized by matching file contents instead of the file name. When you choose by Content, the four fields underneath the Identify setting become active. These fields define what the file contents should be to define files of the current File Type, as follows:

See the magic manual page for advanced information about the Tag Type, Tag Mask, and Tag Value fields.

Figure 16-11 shows that PostScript files can be recognized by the string "%!" at the beginning of the file (Tag Offset = 0, Tag Type = String, Tag Value =%!). Note that PostScript files can also be recognized by files ending with.ps, as described previously in the section "Identify By Name".

Figure 16-11 The postscript-file Content File Type Entry

Graphic

Figure 16-12 shows the sun-raster File Type entry. This class of files is defined as all files starting with the Long value 0x59a66a95.

Figure 16-12 The sun-raster File Type Entry

Graphic