Important: The information in this document is obsolete and should not be used for new development.
Creating an Empty Resource Fork
You can useFSpCreateResFile
,HCreateResFile
, orCreateResFile
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 routinesFSpOpenResFile
,HOpenResFile
, orOpenResFile
.The
FSpCreateResFile
procedure is available only in System 7 and later versions of system software. IfFSpCreateResFile
is not available, you can useHCreateResFile
orCreateResFile
to create a resource fork. TheHCreateResFile
procedure allows you to specify a directory ID and a volume reference number, and is therefore preferred overCreateResFile
. TheCreateResFile
procedure is an earlier version ofHCreateResFile
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