OpenWindows User's Guide

File Type Properties

You use the File Type Properties window to define the set of files that are bound to the icon, colors, and applications defined in the Icon Properties window.

You display the File Type properties by choosing File Types from the Props menu or the Category choice on the Properties window. The default File Type Properties window is shown in Figure 16-7.

Figure 16-7 Default File Type Properties window


You can click SELECT on the plus sign (+) button to expand the window to display the full set of properties, including information needed to identify a class of files, as shown in Figure 16-8.

Figure 16-8 Expanded File Type Properties window


You can shrink the window back down to the smaller size by clicking SELECT on the minus sign (-) button at the bottom of the expanded window.

This section describes the fields in the File Type Properties window.

File Type Scrolling List

Each entry in the File Type scrolling list defines how a file, or a group of files, is recognized by DeskSet applications. You can think of each entry in the File Type scrolling list as a class of files, which may consist of one file or many files. Each class of files in this scrolling list (each File Type entry) is bound to the Icon properties of the current Binder entry.

Note -

If you have two identical File Type entries in your Binder database, only the first one that the Binder reads is used. The first Binder entry to use the File Type entry is not necessarily the first Binder entry in the Binder base window scrolling list.

Pattern Text Field

Use the Pattern text field beneath the scrolling list to modify the name of a File Type entry. If the files are to be identified by a pattern, this pattern must be the name of the Binding entry. If the currently selected File Type is identified by Content, the Pattern text field is dimmed and unavailable.

When there are no items selected on the scrolling list, you can type a pattern into the Pattern text field and press Return to create a new File Type entry.

File Type Properties Window Buttons

You SELECT the buttons to the right of the File Type scrolling list to create and delete File Type entries, and to move them to and from a clipboard, as follows:

You use the Apply and Reset buttons at the bottom of the File Type Properties window to apply your File Type and Icon Properties changes to the current Binder entry, or to reset all the changes you've made since the last Apply.

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 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


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, as described previously in the section "Identify By Name".

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


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