Wiki source for dirGetMacFileTypeAndCreator

Show raw source

======**sqInt dir_GetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator)**======

filename file name
filenamesize file name size
fType macintosh file type, pointer to 4 bytes
fCreator macintosh file type, pointer to 4 bytes

return true if the get worked, or if you want to ignore the call, false to cause the prim to fail
false to fail the primitive call, but this is ignored by file creation.

**From**: Interpreter,file plugin, at file creation time, or by primitive call, or by plugin callback.
Get the macintosh file type and creator.

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.

By default when a file is created and opened for writting we get the file type and creator. If the file type is 'BINA' or '????' or NULL we
set to the 'TEXT' and 'R*ch'. Historically the file type could be 'BINA' or '????' when the file existed on some types of unix based appleshare servers. In such cases the type and creator *could* be set to something else based on the server's default choices.
On MacIntel beware of byte order issues.

See iPhone





Valid XHTML :: Valid CSS: :: Powered by WikkaWiki