Previous Book Contents Book Index Next

Inside Macintosh: Programming With MRJToolkit /
Chapter 2 - MRJToolkit Reference / The MRJFileUtils Class
Methods /


getFileType

Gets the file type of an existing Mac OS file.

public static final MRJOSType getFileType (
                     File file) 
                     throws IOException;
file
The file whose file type you want to obtain.
method result
The 4-byte file type of the file.
DISCUSSION
On the Mac OS platform, a file type is a 4-byte character constant that identifies the type of file to the Finder (for example, 'TEXT' for a text file, or 'APPL' for an application). This method throws IOException if the desired file cannot be found.

SEE ALSO
The setFileTypeAndCreator method (page 37).

The setFileType method (page 38).

The "Finder Interface" chapter in Inside Macintosh: Macintosh Toolbox Essentials for information about file types.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 NOV 1997