GNOME 2.0 Desktop for the Solaris Operating Environment System Administration Guide

File Content Sniffers

File content sniffers are specified in the file /usr/gnome/etc/gnome-vfs-mime-magic. The following is an example of a file content sniffer:

0	string		\x89PNG					image/png

The syntax for file content sniffers is as follows:

offset_start[:offset_end] pattern_type pattern [&pattern_mask] type

Table 4–1 describes the fields in a file content sniffer.

Table 4–1 Fields in a File Content Sniffer

Field 

Description 

offset_start

Specifies the number of characters to ignore in the file before searching for a text pattern. 

pattern_type

Specifies the type of pattern to search for. The string pattern type is the only pattern type that is supported at the time of publication of this guide.

pattern

Specifies the pattern to search for.  

pattern_mask

Specifies a pattern mask, in hexadecimal format. For more information on pattern masks, see the next section.

This field is optional. This field is not present in the example. 

type

Specifies the MIME type to associate with files that match this entry.