The .TYPE extended attribute (EA) indicates the file-type of the file object it is associated with. It is similar to a file name extension.
The name of this EA consists of the string ".TYPE". The value of this EA contains the file object's file-type. The following file types are predefined:
Plain text
OS/2 command file
DOS command file
Executable
Metafile
Bit map
Icon
Binary data
Dynamic link library
C code
Pascal code
BASIC code
COBOL code
FORTRAN code
Assembler code
Library
Resource file
Object code
Data files only require identification of the file type. For data files without EAs, the file type is derived from the file extension, if there is one.
File object types are represented as length-preceded ASCII strings, uniquely identifying the file object's type. This identifier is referenced within the application's .ASSOCTABLE EA in order to bind the data file type to the application. It is important that this name be a unique identifier because all file type names are public data. For example, if application A and application B both had a type name of SPREADSHEET, the filing system would not be able to identify A's SPREADSHEET from B's SPREADSHEET.
The recommended convention for defining file object types is:
For example, spreadsheet files generated by My_Application written by My_Company might have a file object type of the following.
My_Company My_Application Spreadsheet
Type names must be ASCII characters and case is significant.
Note: The performance of extended attributes is dependent on the file system. Because some file systems store extended attributes in first-in/first-out (FIFO) order, it is important to write the .TYPE entry first so OS/2 can access that information quickly.