Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 1 - Resource Manager / Resource Manager Reference
Resource Manager Routines


Creating an Empty Resource Fork

You can use FSpCreateResFile, HCreateResFile, or CreateResFile when you want to create an empty resource fork--that is, a resource fork that contains no resource data but does include a resource map. Note that creating a resource fork does not automatically open it. To open a resource fork of a file created with one of these routines, use the corresponding routines FSpOpenResFile, HOpenResFile, or OpenResFile.

The FSpCreateResFile procedure is available only in System 7 and later versions of system software. If FSpCreateResFile is not available, you can use HCreateResFile or CreateResFile to create a resource fork. The HCreateResFile procedure allows you to specify a directory ID and a volume reference number, and is therefore preferred over CreateResFile. The CreateResFile procedure is an earlier version of HCreateResFile that is still supported but has more restricted capabilities.

Don't use the resource fork of a file for data that is not in resource format. The Resource Manager assumes that any information in a resource fork can be interpreted according to the standard resource format described in this chapter.

The File Manager assumes that the first block of a file's resource fork is part of the resource header and puts information there that it uses during scavenging--for example, after the user presses the Reset switch. For this reason, if you copy a resource file, the duplicate may not be exactly like the original.


Subtopics
FSpCreateResFile
HCreateResFile
CreateResFile

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996