GetResFileAttrs
short rfRefNum ; reference number of an open resource file
returns file attributes of a resource file
resource file's attributes. In doing so, it tests whether a resource file is
marked as read-only, has changed, or needs compacting.
r fRefNum identifies the resource file to query. It is a value obtained from
refers to the system resource file.
Returns: a signed short; a bit record identifying the current resource file attributes of r fRefNum (see below). Note: Use ResError to check whether this function succeeded before assuming a valid return value.
Notes: You will want to use this function before calling SetResFileAttrs, in order to modify one or two attributes while leaving others un changed.
Resource file attributes are defined as follows:
The mapCompact bit is set on all operations that change the size of the file (Note: on the 64K ROMs, this bit was not set if a resource simply got
smaller). When set, the entire resource file is reorganized as it is
rewritten and all empty space in the file is removed.
The mapReadOnly attribute overrides all resource resChanged attributes in data to be written to the file.