Previous Book Contents Book Index Next

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


setFileType

Sets the file type for an existing Mac OS file.

public static final void setFileType (
                     File file, 
                     MRJOSType type) 
                     throws IOException;
file
The file whose file type you want to set.
type
The 4-byte file type you wish to assign.
DISCUSSION
On the Mac OS, 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 setFileCreator method (page 39).

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