Wiki source for dirSetMacFileTypeAndCreator
======**dir_SetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator)**======
**Parms**:
filename file name
filenamesize file name size
fType macintosh file type, pointer to 4 bytes
fCreator macintosh file type, pointer to 4 bytes
**return**: return true if call worked, or if you want to ignore it. false is failure
**From**: Interpreter, file plugin, at file creation time, or by primitive call, or by plugin callback.
**Why**:
Set the macintosh file type and creator.
**Responsibility**:
Because squeak was first developed on the macintosh at Apple, the use of set file type and creator and get file type and creator
is entrenched in the file creation logic.
**MacIntosh**
//os-9/OSXCarbon//
By default when a file is created and opened for writting we set the file type to 'TEXT' and the creator to 'R*ch' which was the creator for BBEdit. Since at the time Apple's text edit program was very primitive, more sophisticated macintosh users used BBEdit to work with text files. Note of course since the file type is 'TEXT' all other programs that can understand text files can open the them. This is the default setting, other logic in the file primitives would then set the file creator to 'FAST' and set the file type to one of the 3 or 4 types that squeak supported. For example we saving the image and change file sets an image and changes file type for squeak files.
On MacIntel beware of byte order issues.
//Cocoa://
TBD
**iPhone**
supported
**Unix**
ignored
**Windows**
ignored
**BUGS**
**Parms**:
filename file name
filenamesize file name size
fType macintosh file type, pointer to 4 bytes
fCreator macintosh file type, pointer to 4 bytes
**return**: return true if call worked, or if you want to ignore it. false is failure
**From**: Interpreter, file plugin, at file creation time, or by primitive call, or by plugin callback.
**Why**:
Set the macintosh file type and creator.
**Responsibility**:
Because squeak was first developed on the macintosh at Apple, the use of set file type and creator and get file type and creator
is entrenched in the file creation logic.
**MacIntosh**
//os-9/OSXCarbon//
By default when a file is created and opened for writting we set the file type to 'TEXT' and the creator to 'R*ch' which was the creator for BBEdit. Since at the time Apple's text edit program was very primitive, more sophisticated macintosh users used BBEdit to work with text files. Note of course since the file type is 'TEXT' all other programs that can understand text files can open the them. This is the default setting, other logic in the file primitives would then set the file creator to 'FAST' and set the file type to one of the 3 or 4 types that squeak supported. For example we saving the image and change file sets an image and changes file type for squeak files.
On MacIntel beware of byte order issues.
//Cocoa://
TBD
**iPhone**
supported
**Unix**
ignored
**Windows**
ignored
**BUGS**