![]() |
Resource Fork Attribute Mask Constants |
Header: Resources.h |
enum { resSysRefBit = 7, resSysHeapBit = 6, resPurgeableBit = 5, resLockedBit = 4, resProtectedBit = 3, resPreloadBit = 2, resChangedBit = 1, mapReadOnlyBit = 7, mapCompactBit = 6, mapChangedBit = 5 };
If this attribute is set to 1, the Resource Manager doesnt write anything to the resource fork on disk. It also doesnt check whether the resource data can be written to disk when the resource map is modified. When this attribute is set to 1, the WriteResource
functions do nothing, but the function
If you set the mapReadOnly attribute but later clear it, the resource data is written to disk even if theres no room for it. This operation may destroy the resource fork.
If this attribute is set to 1, the Resource Manager compacts the resource fork when it updates the file. The Resource Manager sets this attribute when a resource is removed or when a resource is made larger and thus must be written at the end of a resource fork. You may want to set the mapCompact attribute to force the Resource Manager to compact a resource fork when your changes have made resources smaller.
If this attribute is set to 1, the Resource Manager writes the resource map to disk when the file is updated. For example, you can set mapChanged if youve changed resource attributes only and dont want to call the
The GetResAttrs function uses the following masks to test the attributes it returns, while the SetResAttrs function uses the following masks to set the attribute bits in the attrs parameter.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)